Built-In Scheduling | ||
---|---|---|
Previous | Next | |
Third-Party Scheduling | Runtime Engine Monitoring |
You can schedule deliverables using the built-in scheduler. Deliverables scheduled this way appear as jobs named after the deliverable.
However , you can schedule a deliverable several times as jobs with a different name, and attach one or more triggers to one job. A named job is unique.
Once you are in the command line (using
startcommand.bat
or
startcommand.sh
), connect to the runtime into which you wish to schedule a job.
To connect to the local runtime, use the command:
>connect
You can also use this command to connect to a remote runtime. Use the
help
command for more details about all commands.
To schedule a job with a single schedule:
>schedule delivery MY_DELIVERY cron "0 15 10 * * ? *"
To schedule a job with different names and schedules
>schedule delivery MY_DELIVERY with name NAME1 cron "0 15 10 * * ? *"
>schedule delivery MY_DELIVERY with name NAME1 cron "0 20 10 * * ? *"
>schedule delivery MY_DELIVERY with name NAME2 cron "0 15 11 * * ? *"
To schedule a job with a starting date and/or an ending date:
>schedule delivery MY_DELIVERY start "2009/12/10 12:55:22" cron "0 15 10 * * ? *"
>schedule delivery MY_DELIVERY start "2009/12/10 12:55:22" end "2009/12/25 12:55:22" cron "0 15 10 * * ? *"
To retrieve the list of schedules for a deliverable
> get delivery schedules MY_DELIVERY
Getting schedules for MY_DELIVERY
-- Trigger Name: CRON_MY_DELIVERY-0
-- Job Name: MY_DELIVERY
[...]
Using the Trigger Name returned in the list of schedules, you can remove a schedule.
> remove trigger CRON_MY_DELIVERY-0
If you need more information about the command line:
>help
A Cron expression is a character string containing 6 or 7 fields separated by spaces.
These fields can contain the characters listed in this table, or a combination of them.
Field name | Mandatory | Authorized values | Authorized special characters |
---|---|---|---|
Seconds | YES | 0-59 | , - * / |
Minutes | YES | 0-59 | , - * / |
Hours | YES | 0-23 | , - * / |
Day of the month | YES | 1-31 | , - * ? / L W |
Month | YES | 1-12 or JAN-DEC | , - * / |
Weekday | YES | 1-7 or SUN-SAT | , - * ? / L # |
Year | NO | empty, 1970-2099 | , - * / |
*
(“all values”) – used to select all the values for this field. For example,
*
in the minutes field means ‘every minute’.
?
(“no specific value”) – useful if you need to specify something in one of the two fields relevant to this special character, but not in the other one. For example, if you wish to set a trigger for a specific day in the month (let’s say the 10th), whatever the weekday. In this case, you will put ‘10’ in the ‘day of the month’ field, and ‘?’ in the ‘weekday’ field. For further understanding, check the examples.
-
used to specify an interval. For example,
10-12
in the ‘hour’ field means “hours 10, 11 and 12”.
,
– used to add more values. For example, “MON,WED,FRI” in the ‘weekday’ field means “Mondays, Wednesdays and Fridays”.
/
– used to specify repetition increments. For example, “0/15” in the ‘seconds’ field means “seconds 0, 15, 30 and 45”, in other words every 15 seconds, starting at 0 included. And “5/15” in the same field means “seconds 5, 20, 35, et 50”. If you put ‘/’ with no number before and a number behind (for example ‘/5’) is equivalent to putting a 0 before the ‘/’. (i.e. ‘0/5’). Another example: ‘1/3’ in the ‘day of the month’ field means “trigger every 3 days starting on the 1st of the month”.
L
(Last) – this character has different meanings depending on the field it is used in. For example, “L” in the ‘day of the month’ field means “the last day of the month”, i.e. the 31st for January, the 28th for February in non leap years. If ‘L’ is used in the ‘weekday’ field, it means the 7th day, i.e. Saturday (SAT). However, if ‘L’ is used in the ‘weekday’ field following a number, it will mean “the last X day in the month”; for example “6L” means “the last Friday in the month”. So as to have no ambiguity, it is advised not to use the ‘L’ character in value lists.
W
(weekday) – Used to specify the working weekday (Monday to Friday) that is nearest to a given date. For example, “15W” in the ‘day of the month’ field means “the working weekday the closest to the 15th”. So, if the 15th happens to be a Saturday, the trigger will position itself to Friday the 14th. And if the 15th happens to be a Sunday, the job will trigger on Monday the 16th. Take care, though, if you specify “1W” and the 1st happens to be a Saturday, the job will only be triggered on Monday the 3rd, since you cannot change the month. Also, ‘W’ will only work with unique values, not with intervals. Characters ‘L’ and ‘W’ can be combined in the ‘day of the month’ field: “LW” will then mean “the last working weekday in the month”.
#
– used to specify “the n-th day XXX in the month”. For example, value “6#3” in the ‘weekday’ field means “the 3rd Friday of the month” (Day 6 = Friday, and #3 = the 3rd of the month).
Day names are not case-sensitive. This means ‘MON’ and ‘mon’ are identical.
Expression | Meaning for the trigger |
---|---|
0 0 12 * * ? | At 12 o’clock every day |
0 15 10 ? * * | at 10:15 every day |
0 15 10 * * ? | at 10:15 every day |
0 15 10 * * ? * | at 10:15 every day |
0 15 10 * * ? 2005 | at 10:15 every day of year 2005 |
0 * 14 * * ? | Every minute, between 14:00 and 14:59, every day |
0 0/5 14 * * ? | Every 5 minutes from 14:00 to 14:55, every day |
0 0/5 14,18 * * ? | Every 5 minutes from 14:00 to 14:55, every day, and every 5 minutes from 18:00 to 18:55, every day |
0 0-5 14 * * ? | Every minute from 14:00 to 14:05, every day |
0 10,44 14 ? 3 WED | at 14:10 and 14:44 every Wednesday of the month of March |
0 15 10 ? * MON-FRI | at 10:15 every Monday, Tuesday, Wednesday, Thursday and Friday |
0 15 10 15 * ? | at 10:15 on the 15th of each month |
0 15 10 L * ? | at 10h15 every last day of the month |
0 15 10 ? * 6L | at 10:15 the last Friday of each month |
0 15 10 ? * 6L 2002-2005 | at 10:15 the last Friday of each month for years 2002 to 2005 |
0 15 10 ? * 6#3 | at 10:15 the third Friday of each month |
0 0 12 1/5 * ? | at 12:00 every 5 days, each month, starting on the 1st |
0 11 11 11 11 ? | Every November 11th at 11:11 |
Previous | Top | Next |
Third-Party Scheduling | Runtime Engine Monitoring |