Scheduler jobs in the system are used to perform certain actions and can be set to be executed periodically within a specified interval.
The Scheduler job should be configured prior to launching. The configuration of all scheduler jobs are performed in Scheduler properties that can be found in two places:
Using nice UI in the system: System configuration > Sites > System Status > Scheduler
Note! Access to the Edit Scheduler functionality is regulated in the
System.properties
file. As a value to the schedulerPropertiesEditors parameter, you specify the comma-separated list of User IDs who will be able to edit Scheduler properties from system UI. For all other users, the Scheduler Properties button will be hidden.Put an asterisk (*) to enable all the users to access Scheduler properties functionality from UI.
Editing the file
~/.encodeProperties/Scheduler.properties
.
The most important property of any job is joblist
that defines which job will be actually performed. Should be uncommented in order to be active.
In order to make a job inactive, put the # next to the joblist
. In this case, the job will be ignored by the scheduler.
There are a number of parameters that exist for all scheduler jobs, irrespectively of the type:
....startimes=01-01-1999,01-01-1999...
comma separated — specifies when the scheduler should be started
....interval=
— interval in seconds at which the job will be re-run.
....SiteID=
— ID of the site for which scheduler task will be performed.
Note, that some jobs ignore SiteID
parameters and go through all the sites. The example is FieldObjectWatcher job.
The Scheduler is started using the following command:
setCLASSPATH.sh 'java enCode.app.common.scheduler.Scheduler [-d -h -j -q]'
where:
-d (--debug)
— Turn on the debug mode
-h (--help)
— Show help
-j (--job) jobName
— Runs only this job once and exits
-q (--quartz)
— Run the quartz server
Note! The Scheduler and the Encode system are separate processes with independent connection counters.