User`s guide
7 Program Independent Jobs
7-18
more than one task for the job. (Note: Do not confuse this property with the UserData
property on any objects in the MATLAB client. Information in UserData is available
only in the client, and is not available to the scheduler or workers.)
• AttachedFiles — This property of the job object is a cell array in which you
manually specify all the folders and files that get sent to the workers. On the worker,
the files are installed and the entries specified in the property are added to the search
path of the worker session.
AttachedFiles contains a list of folders and files that the worker need to access for
evaluating a job’s tasks. The value of the property (empty by default) is defined in
the cluster profile or in the client session. You set the value for the property as a cell
array of strings. Each string is an absolute or relative pathname to a folder or file.
(Note: If these files or folders change while they are being transferred, or if any of the
folders are empty, a failure or error can result. If you specify a pathname that does
not exist, an error is generated.)
The first time a worker evaluates a task for a particular job, the scheduler passes
to the worker the files and folders in the AttachedFiles property. On the worker
machine, a folder structure is created that is exactly the same as that accessed on the
client machine where the property was set. Those entries listed in the property value
are added to the top of the command search path in the worker session. (Subfolders
of the entries are not added to the path, even though they are included in the folder
structure.) To find out where the files are placed on the worker machine, use the
function getAttachedFilesFolder in code that runs on the worker.
When the worker runs subsequent tasks for the same job, it uses the folder structure
already set up by the job’s AttachedFiles property for the first task it ran for that
job.
When you specify AttachedFiles at the time of creating a job, the settings are
combined with those specified in the applicable profile. Setting AttachedFiles on a
job object after it is created does not combine the new setting with the profile settings,
but overwrites the existing settings for that job.
The transfer of AttachedFiles occurs for each worker running a task for that
particular job on a machine, regardless of how many workers run on that machine.
Normally, the attached files are deleted from the worker machine when the job is
completed, or when the next job begins.
• AutoAttachFiles — This property of the job object uses a logical value to specify
that you want MATLAB to perform an analysis on the task functions in the job and on