taskStartup - User-defined options to run on worker when task starts - MATLAB (original) (raw)

Main Content

User-defined options to run on worker when task starts

Arguments

task The task being evaluated by the worker.

Description

taskStartup(task) runs automatically on a worker each time the worker evaluates a task for a particular job. You do not call this function from the client session, nor explicitly as part of a task function.

You add MATLAB code to the taskStartup.m file to define task initialization on the worker. The worker looks for taskStartup.m in the following order, executing the one it finds first:

  1. Included in the job's AttachedFiles property.
  2. In a folder included in the job's AdditionalPaths property.
  3. In the worker's MATLABĀ® installation at the location
    matlabroot/toolbox/parallel/user/taskStartup.m

To create a version of taskStartup.m forAttachedFiles or AdditionalPaths, copy the provided file and modify it as required. For further details ontaskStartup and its implementation, see the text in the installed taskStartup.m file.

Version History

Introduced before R2006a