Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contentsoutlinh1. trueoutlinh1. true1printablefalse2stylh1. none3indent20px

How can I stop and disable all jobs using a common resource gracefully?

For example, if I have to do some database maintenance work? We're going to have 100s of jobs, so we will need to be able to disable all jobs at the same time. The "Terminate" option of the main JOC menu isn't quite a graceful solution.

There are two possible parts to a solution Process Classes and Locks.

Process classes

Process classes are objects which can be assigned to jobs. In the situation described here we are interested in using the process class to restrict the number of instances of a job that can be run at any one time. Setting the "tasks" parameter to "0" for a job will allow all instances of that job to end regularly but prohibit new instances from starting.

We recommend setting up "Resource Maintenance" jobs to automatically set the tasks parameter to 0 for all the jobs using a resource and then reset the value after maintenance.

See also:

  • The "Process Classes" FAQ, which provides a good introduction to process classes.
  • The Process Classes section in the JobScheduler Reference Manual, which covers the subject in more detail.

It is not necessary to stop or suspend the JobSchedulers

Note that in cluster operation all the JobSchedulers in a cluster will be using the same database, meaning that for database maintennace all jobs being executed by all the JobSchedulers will have to be stopped. In addition the JobSchedulers themselves will have to be suspended as the will otherwise continue to write their heartbeats into the database.

Locks

See also:

  • The "Locks" FAQ, which provides a good introduction to using locks.
  • The Locks section in the JobScheduler Reference Manual, which covers the subject in more detail.