Skip to Main Content Skip to Search
Product Documentation

taskFinish - User-defined options to run on worker when task finishes

Syntax

taskFinish(task)

Arguments

task

The task being evaluated by the worker

Description

taskFinish(task) runs automatically on a worker each time the worker finishes evaluating 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 taskFinish.m file to define anything you want executed on the worker when a task is finished. The worker looks for taskFinish.m in the following order, executing the one it finds first:

  1. Included in the job's AttachedFiles (or FileDependencies) property.

  2. In a folder included in the job's AdditionalPaths (or PathDependencies) property.

  3. In the worker's MATLAB installation at the location

    matlabroot/toolbox/distcomp/user/taskFinish.m
    

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

See Also

jobStartup | poolStartup | taskStartup

  


Free Parallel Computing Interactive Kit

See how to solve large problems with minimal effort and reduce simulation time.

Get free kit

Trials Available

Try the latest versions of parallel computing products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS