MATLAB 도움말 센터
Find task in job
tasks = findTask(j)
tasks = findTask(j,taskFcn)
[pending,running,completed] = findTask(j)
tasks = findTask(j,propertyName=Value)
tasks = findTask(j) returns a 1-by-N array of task objects in the job j. The tasks in the array are in order of their ID property, indicating the sequence in which they were created.
tasks
j
1
N
ID
example
tasks = findTask(j,taskFcn) returns an array of task objects in the job j, filtered using the taskFcn property. taskFcn is a function handle that accepts the j.Tasks property as an input argument, and returns a logical array that indicates the tasks to return.
taskFcn
j.Tasks
[pending,running,completed] = findTask(j) sorts all the tasks stored in the job j by state. Within the pending,running,completed array, the software returns the tasks in order of creation.
pending
running
completed
tasks = findTask(j,propertyName=Value) specifies properties and values to find, using one or more property name-value arguments. For a list of task properties, see parallel.Task.
propertyName=Value
parallel.Task
The object property value must match the specified value exactly. For example, if the Name property value of a task is MyTask, then findTask does not find that object when it searches for a task with the Name property value of mytask.
Name
MyTask
findTask
mytask
collapse all
Create a job object on the default cluster.
c = parcluster; j = createJob(c);
Create and add a task to the job object.
createTask(j,@rand,1,{10})
Find all task objects now part of job j.
t = findTask(j)
parallel.Job
Job in which the software finds the task, specified as a parallel.Job object.
Function that findTask uses to filter the tasks from the job j, specified as a function handle.
parallel.task
Task object property name and value to find, specified as a parallel.task property name-value argument. If you specify more than one property name-value argument, findJob returns entries that meet all of the search criteria. For a full list of task object properties, see parallel.Task.
findJob
Example: findTask(job,Name="jsmith") finds task objects that have the Name property value of jsmith.
findTask(job,Name="jsmith")
jsmith
Tasks in the job that meet the search criteria, returned as an array of parallel.Task objects.
Tasks in a pending state on the job, returned as an array of parallel.Task objects.
Tasks in a running state on the job, returned as an array of parallel.Task objects.
Tasks in a completed or failed state on the job, returned as an array of parallel.Task objects.
If the job j is contained in a remote service, findTask results in a call to the remote service. This could result in findTask taking a long time to complete, depending on the number of tasks retrieved and the network speed. Also, if the remote service is no longer available, the software throws an error.
Introduced before R2006a
createJob | createTask | findJob
createJob
createTask
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의