Scheduler task options

From Messaging Server Technical Reference Wiki
Jump to: navigation, search


When the Scheduler is enabled, each named task known to the Scheduler may be explicitly enabled or disabled via the task's own enable option (but typically the task's enable value defaults appropriately based on which Messaging Server components are enabled), and if enabled (whether implicitly or explicitly) will be executed at the schedule set via the crontab option for that task; e.g.,


msconfig> show schedule.enable
role.schedule.enable = 1
msconfig> show mta.enable
role.mta.enable = 1
msconfig> show schedule.task:return_job.*
role.schedule.task:return_job.crontab = 30 0 * * * lib/return_job

The Scheduler supports the following named tasks in particular:

  1. expire, the Message Store's message expiration job, that deletes from disk messages that users have deleted from their mailboxes, and purges messages from users' mailboxes according to administrative criteria,
  2. msprobe, checking whether Messaging Server components such as server processes are available ("up") and responsive,
  3. purge, the MTA's log file purge job, that purges older MTA log files,
  4. return_job, the MTA's message return job (message bouncer job), that returns (bounces) excessively old, undelivered messages,
  5. snapshot, the Message Store's database "snapshot" job, that captures a current-moment "snapshot" of the messages in the Message Store,
  6. snapshotverify, the Message Store's database "snapshot verification" job, that verifies whether snapshots are sound.

Individual Scheduler tasks can themselves be enabled or disabled through the use of the enable task option. For example, the following commands disable msprobe and explicitly enable imexpire:


msconfig> set schedule.task:msprobe.enable 0
msconfig# set schedule.task:expire.enable 1

Almost all Scheduler settings are refreshable: New tasks can be added, task parameters can be changed, disabled tasks can be enabled, and as of Messaging Server 8.0.1.2, enabled tasks can be enabled. In all of these cases a refresh imsched will cause the changes to take effect.

At present only the outright deletion of a task requires a Scheduler restart:


stop-msg sched
start-msg sched

Other tasks can be executed by the Scheduler. For instance, rather than executing the Message Store's impurge job as a daemon as normally configured when store.enable is enabled, a site can disable that daemon via store.purge.enable=0 and instead configure the Scheduler to run the impurge command periodically.


See also: