Setting thread schedules
Threads can be scheduled to run at specific times of the day by using the thread.schedule setting. The threads can be set to run at one or more times during a 24-hour period, with or without retries, or at regular intervals during a scheduled range. The schedule setting accepts these values:
- To schedule the thread to
run one time at specific times, specify the times in the 24-hour format
(
HH:MM
). Separate entries with the;
character. - To schedule the thread to
retry if the thread fails, specify additional information after the scheduled
time in the format
HH:MM/#@S
, where#
is the number of retries, andS
is the amount of time, in milliseconds, to wait between each retry attempt. - To schedule the thread to
run at regular intervals within a scheduled range of time, specify the time
range separated by a dash and the interval time, in the format
Start time - End time@S
, where the Start time and End time are in theHH:MM
format andS
is the amount of time, in milliseconds, to wait before running the thread again.
Consider these examples:
-
thread.exportswipes.schedule = 02:30
-
thread.exportswipes.schedule = 02:00;11:30;18:00
-
thread.exportswipes.schedule = 2:00/3@600000;12:00
-
thread.exportswipes.schedule = 12:00-14:00@600000;9:00
In example 1, the thread runs every day at 2:30. In example 2, the thread runs every day at 2:00, 11:30, and 18:00 with no retries. In example 3, the thread runs at 2:00 and 12:00 every day, but if the thread fails to start at 2:00, the thread tries up to 3 times in ten minute intervals (600000 milliseconds). In example 4, the thread is scheduled to run between 12:00 and 14:00 at ten minute intervals, and then run once at 9:00.