Schedule management¶
Note
Currently, scheduled scan launches are available only via the server part.
Server part¶
You can manage schedules via Swagger, using the requests on the “Scheduler” tab.
A schedule task is defined by the fields presented in the table below.
| Parameter | Type | Description |
|---|---|---|
id * |
Integer | Task identifier |
tenantID * |
Integer | Identifier of the organization in which the task is created. Inherited from the user |
schedule * |
String | Describes the schedule in Cron format |
finishAt |
Date and time | Describes the end time of the scheduled command launch cycle. Requires the schedule parameter. Used when the count parameter is not set |
count |
Integer | Defines the number of command launches in the schedule cycle. Requires the schedule parameter. Used when the finishAt parameter is not set |
action |
String | Describes the action to be performed on schedule. Currently, only the startScans value is available, which characterizes the launch of scans |
actionData |
Object | Contains parameters for launching the action specified in the action parameter |
description |
String | Textual description of the schedule task |
createdAt |
Date and time | Task creation time in UTC |
updatedAt |
Date and time | Task update time in UTC |
Note
Fields marked with * are mandatory.
Cron format¶
A special Cron format is used to fill in the schedule field.
* * * * * command
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ └── day of week (0 — Sunday, 1 — Monday, …, 6 — Saturday)
│ │ │ └─────── month (1‑12)
│ │ └──────────── day of month (1‑31)
│ └───────────────── hour (0‑23)
└────────────────────── minute (0‑59)
Supported scenarios¶
| Scenario | Example | Result |
| Every N minutes (from the start of the hour) | */15 * * * * |
At 00:00, 00:15, 00:30, 00:45, 01:00, 01:15, 01:30, … |
*/25 * * * * |
At 00:00, 00:25, 00:50, 01:00, 01:25, 01:50, … | |
| At specific minutes of every hour | 13,43 * * * * |
Every hour at :13 and :43 |
0 * * * * |
Every hour exactly at :00 | |
| Every N hours (from the start of the day) | 13 */3 * * * |
At 00:13, 03:13, 06:13, 09:13, … |
0 */3 * * * |
At 00:00, 03:00, 06:00, 09:00, … | |
| Every day | 13 14 * * * |
Every day at 14:13 |
13 9,14,18 * * * |
Every day at 09:13, 14:13 and 18:13 | |
| On specific days of the week | 13 14 * * 1,3,5 |
Mon, Wed, Fri at 14:13 |
13 14 * * Mon,Wed,Fri |
||
13 14 * * 1-5 |
On weekdays (Mon – Fri) at 14:13 | |
13 14 * * 1,2,3,4,5 |
||
13 14 * * Mon-Fri |
||
13 14 * * Mon,Tue,Wed,Thu,Fri |
||
13 14 * * 0,6 |
On weekends (Sat and Sun) at 14:13 | |
13 14 * * Sat,Sun |
||
0 0 * * 1 |
On Mon at 0:00 | |
0 0 * * Mon |
||
| Every N days (from the start of the month) | 13 14 */12 * * |
Every 12 days at 14:13 |
0 0 */10 * * |
Every 10 days at 00:00 | |
| On a specific day of the month | 13 14 9 * * |
The 9th of every month at 14:13 |
13 14 1,9,20 * * |
The 1st, 9th, and 20th of every month at 14:13 | |
13 14 1-5 * * |
From the 1st to the 5th of every month at 14:13 | |
| In specific months | 13 14 9 3,6,9,12 * |
March 9, June 9, September 9, and December 9 at 14:13 |
| Every N months (counted from the start of the year) | 13 14 9 */5 * |
First year: January 9, June 9, November 9 at 14:13; Second year: January 9, June 9, November 9 at 14:13; … |
| Annually on a specific date | 13 14 10 9 * |
Every year on September 10 at 14:13 |
13 14 10 3,6,9,12 * |
Every year on March 10, June 10, September 10, and December 10 at 14:13 | |
| On a specific day of the week in selected months | 13 14 * 3,6,9,12 3 |
Every Wednesday of March, June, September, and December at 14:13 |
| Combination of day of month and day of week | 13 14 9 * 3 |
Triggers on the 9th of every month and every Wednesday |
Unsupported Scenarios¶
- Every N minutes (from an arbitrary reference point);
- Every N days (from an arbitrary reference point);
- Every N weeks (from an arbitrary reference point);
- Every N months (from an arbitrary reference point);
- Every N years;
- The second Wednesday of the month;
- The last Friday of the month;
- The first business day of the month;
- The Nth day of the week of the month;
- September 9 once every N years;
- The second Wednesday of September;
- The second Wednesday of March, June, September, December.
Schedule Example¶
-
Sequential launch of three scans with target identifier
1every 5 minutes (from the start of the hour).