Elastic Compute Service
Field | Required | Value range | Special character |
Field | Required | Value range | Special character |
Minute | Yes | 0-59 | * , - \ |
Hour | Yes | 0-23 | * , - \ |
Day | Yes | 1-31 | * , - L W |
Month | Yes | 1-12 | * , - \ |
Week | Yes | 1-7 | * , - \ L # |
Special character | Explanation | Sample value |
Special character | Explanation | Sample value |
* | Indicates all numbers within the value range. | In the month field, * indicates every month. |
, | Enumerates possible values. | In the week field, 1,2,5 indicates Monday, Tuesday, and Friday. |
- | Specifies a value range. | In the day field, 28-31 indicates the 28th, 29th, 30th, and 31st days of the month. |
/ | Indicates an increment value. | In the minute field, */5 indicates every 5 minutes starting from minute 0. 3/5 indicates every 5 minutes starting from minute 3. |
L | The abbreviation of Last, indicating the last day. This character is only supported in the day and week fields. |
|
W | Indicates the nearest working day (Monday to Friday) to the specified day in the day field. This character is supported only in the day field. | 15W indicates the nearest working day to the 15th of each month. If the 15th is a working day, the target date is the 15th. If it is a Saturday, the target date is the 14th. If it is a Sunday, the target date is the 16th.
|
# | Specifies the Nth weekday of each month with a specific number required. After #, only numbers 1-5 are supported. This character is supported only in the week field. | 7#2 indicates the second Sunday of the specified month in the week field. |
Sample value | Description |
Sample value | Description |
15 10 * * * | To trigger a task every day at 10:15 |
0 /8 * * * | To trigger a task daily at 08:00, 16:00, and 24:00 |
0 10,14,16 * * * | To trigger a task daily at 10:00, 14:00, and 16:00 |
15 10 15 * * | To trigger a task at 10:15 on the 15th day of each month |
15 10 L * * | To trigger a task at 10:15 on the last day of each month |
15 10 * * 6L | To trigger a task at 10:15 on the last Saturday of each month |
15 10 * * 6#3 | To trigger a task at 10:15 on the third Saturday of each month |
10,44 14 * 3 3 | To trigger a task at 14:10 and 14:44 on Wednesdays in March every year |
15 10 * * 1-5 | To trigger a task at 10:15 from Monday to Friday every week |
*/30 * 15 * * | To trigger a task every 30 minutes on the 15th day of each month |
0 10 15W 3 * | To trigger a task at 10:00 on the nearest working day to March 15 every year |