The Scheduler is time-based, much like linux' Cron system.
It means that you can define when the Deliveries are executed by specifying valid days and times when the Delivery will start.
There is currently no feature like job dependencies or event-driven executions. The latter can be obtained with other techniques, but not with the Scheduler.
So, the idea is that you can say :
- I want this delivery to start every day at 5am
- I want this delivery to start every weekday each 30min between 8am and 6pm
etc. See the Reference documentation for more details and examples.
Defining Schedules: command line or UI
Schedules can be defined from the Runtime's command line or from the Navigator UI, which is available in Analytics and the Designer.
Jobs and Queueing
When scheduling a Delivery, the schedule is attached to a Job. By default this Job is the Delivery's name.
Within a Job, when a schedule is running, the other schedules wait, they are queued.
So if one defines multiple schedules for a given Delivery, they will not execute in parallel.
Parallel execution of schedules can be obtained by providing distinct Job Names to Schedules.
When a schedule is queued, there is a delay of 60 seconds after which it will be discarded if other schedules from the same JobName are still running. This delay can be configured in the engineScheduler.properties file, property "org.quartz.jobStore.misfireThreshold".
Execution mode: Command Line or Memory
When defining the first Schedule of a Job, you can specify the execution mode which will apply for all schedules in this Job.
- Command Line: the Delivery will be executed in an autonomous Java process
- Memory: the Delivery will be executed in the Runtime's JVM
Note: the Execution option will be greyed out or ignored when adding a Schedule to an existing Job : the Job's execution mode will apply.
Here is how to use the command line for adding a Schedule to a Delivery using a different Job Name and Execution Mode :
schedule delivery MYPROCESS1 jobName MYPROCESS1_JobMemory cron "0 0 8 * * ? *"
schedule delivery MYPROCESS1 jobName MYPROCESS1_JobCommand with command cron "0 0 15 * * ? *"
=> MYPROCESS1 will start at 8am in the Runtime's JVM and at 3pm in a separate Java process.