Scheduled Tasks
In scenarios where businesses are aware of traffic changes in fixed cycles, scheduled tasks can be used to perform scaling activities of specified quantities at designated times.
Create a Scheduled Task
Description of Scheduled Tasks
- Scheduled tasks have no direct relationship with rules and are not constrained by maximum/minimum values.
- After a scheduled task triggers scaling, node counts may be readjusted by other rules again after the cooling period.
- UAS time is set to UTC.
- Scheduled tasks use UNIX CRON syntax.
The specific syntax is as follows:
Value | Type | Description | Supported Special Characters |
---|---|---|---|
30 | Minute | 0 - 59 | , - * / |
23 | Hour | 0 - 23 | , - * / |
1 | Day of Month | 1 - 31 | , - * / LW |
2 | Month | 1 - 12 | , - * / |
* | Day of Week | 0 - 6 or Sun - Sat0, Sun, SUN = Sunday 1, Mon, MON = Monday… 6, Sat, SAT = Saturday | , - * / L# |
Description of Scheduled Tasks
You can use the following special characters in cron expressions.
Character | Description |
---|---|
* | (All values) - Wildcard, matches all possible values in the field. For example, if you want the trigger to fire every minute of the hour at 10 PM, use * for the minute character in the expression. See examples below. |
- | Specify a range of values. For example, you can use 1 - 5 in the day - of - week field to match weekdays (Monday to Friday). See examples below. |
, | Specify a set of discrete values. For example, when entering 1,10,20,30 in the day - of - month field, it will fire on the 1st, 10th, 20th, and 30th days of a month (if possible). |
/ | Specify the increment of the field by field unit. For example, 5/20 in the minute field matches the 5th, 25th, and 45th minutes of each hour. |
L | The last value accepted in the following fields: Day - of - month: Specify the last day of the currently selected month. For January, this matches 31. For a common year February, this matches 28. For April, this matches 30. Day - of - week: It specifies the last day of the week by itself, matching 6 (Saturday). When used with other values, it specifies the last matching value of the month. For example, 3L means the last Wednesday of the month. |
W | Specify the nearest matching weekday. For example, entering 22W in the day - of - month field will match the weekday closest to the 22nd of the month. If the 22nd is a Saturday, the cron job will match the 24th (next Monday). Tip: You can use LW in the day - of - month field to match the last weekday of the month. |
# | Specify the nth day of the month. Example for day - of - week field: 3#4 - The fourth Tuesday of the month; 5#2 - The second Thursday of the month |