Scheduled Jobs Syntax
The PureMessage Scheduler is a cron-like service that runs PureMessage commands at scheduled times. The advantage of using the Scheduler instead of cron is that it allows the scheduled jobs to be easily stopped and started along with PureMessage itself or on command.
On the Local Services tab, click Scheduler Service to view the service status or to start and stop the Scheduler. To edit individual services, click the Job Name in the Scheduled Services table.
Scheduled jobs can also be added by editing /opt/pmx6/etc/scheduler.conf. Each event is described in an <event> section. For example:
<event queue> desc = 'Run the PureMessage Queue' enabled = 1 action = /opt/pmx6/bin/pmx-queue type = exec #run every five minutes <when> s = 1 m = */5 </when> </event>
The <when> block determines how often the Scheduler runs an event. If the <when> block does not contain a value or if it is missing, the time defaults to once a minute. For events that run less often, you must specify times and dates. For example, to schedule an event to run at 2:40 a.m. on the 15th and 30th day of each month and every Sunday morning, enter:
<when> s = 1 m = 40 h = 2 md = 15 md = 30 wd = 7 </when>
s = 1or it will run at every second of the specified minute (60 seconds, from 2:40 to 2:41).
The Scheduler's command-line options are available via pmx-scheduler.