Job schedules
The job engine periodically checks if jobs need to be started. This period is called the job trigger period. The job trigger period can be set through the job engine’s job properties. The default job trigger period is 240.000 milliseconds. This means by default the job engine checks every four minutes if jobs need to be run. For instance the job trigger period runs this check at 9:01, 9:05, 9:09, 9:13, etc.
A triggered job engine run checks in all job schedules if any job needs to run. For instance, assume the job “planRunner” has a schedule to run hourly at the top of the hour. At 9:01 the job engine detects that the job needs to run now as it is already past the hour and starts the job “planRunner”. This job then queries the system for internal tasks to run, for example, tasks to delete unused files. Assume that the job finds that 20.000 unused files need to be deleted. The job engine has in its job properties a configuration that limits how many internal tasks can be run per job trigger period. Assume this is configured to 10.000. This means that the job is only allowed to proceed with 10.000 tasks, i.e. the job starts to delete only 10.000 files in this job trigger period run.
Each non-system job has a job schedule represented by an XML document. A job can be scheduled hourly, daily, and event-based. As of 9.4 ImageMaster can configure job schedules directly via the ImageMaster AdminClient see [UM AdminClient] for more details.
For instance, to schedule a job to run every day at 06:00 a.m. The following XML fragment represents this schedule:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule xmlns="http://www.tsystems.com/ima/9.0/jobschedule">
<daily time="06:00:00.000"/>
</schedule>
To schedule a job to run every day at 06:00 a.m., 08:00 a.m. and 11:00 p.m. the following XML fragment represents this schedule:
?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule xmlns="http://www.tsystems.com/ima/9.0/jobschedule">
<daily time="06:00:00.000"/>
<daily time="08:00:00.000"/>
<daily time="23:00:00.000"/>
</schedule>
To schedule a job to run every twenty minutes starting at the full hour the following XML fragment represents this schedule.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule xmlns="http://www.tsystems.com/ima/9.0/jobschedule">
<hourly minute="0"/>
<hourly minute="20"/>
<hourly minute="40"/>
</schedule>
For further details refer to the XSD of the job schedule configuration in Configurative and administrative entities “Job Schedule”.