User`s guide

7 Program Independent Jobs
7-34
Filename Description
deleteJobFcn.m Script to delete a job from the scheduler
extractJobId.m Script to get the job’s ID from the scheduler
getJobStateFcn.m Script to get the job's state from the scheduler
getSubmitString.m Script to get the submission string for the scheduler
These files are all programmed to use the standard decode functions provided with the
product, so they do not have specialized decode functions.
The folders for other scheduler types contain similar files.
As more files or solutions for more schedulers might become available at any time, visit
the product page at http://www.mathworks.com/products/distriben/. This Web page
provides links to updates, supported schedulers, requirements, and contact information
in case you have any questions.
Manage Jobs with Generic Scheduler
While you can use the cancel and delete methods on jobs that use the generic
scheduler interface, by default these methods access or affect only the job data where it is
stored on disk. To cancel or delete a job or task that is currently running or queued, you
must provide instructions to the scheduler directing it what to do and when to do it. To
accomplish this, the toolbox provides a means of saving data associated with each job or
task from the scheduler, and a set of properties to define instructions for the scheduler
upon each cancel or destroy request.
Save Job Scheduler Data
The first requirement for job management is to identify the job from the cluster’s
perspective. When you submit a job to the cluster, the command to do the submission in
your submit function can return from the scheduler some data about the job. This data
typically includes a job ID. By storing that job ID with the job, you can later refer to the
job by this ID when you send management commands to the scheduler. Similarly, you
can store information, such as an ID, for each task. The toolbox function that stores this
cluster data is setJobClusterData.
If your scheduler accommodates submission of entire jobs (collection of tasks) in a single
command, you might get back data for the whole job and/or for each task. Part of your
submit function might be structured like this: