Schedule trigger
The schedule automation trigger can be used for monthly, weekly, daily, hourly, or one-time triggers, including a one-time configuration backup to a disk, a reboot, or a shutdown.
config system automation-trigger edit <name> set trigger-type scheduled set trigger-frequency {hourly | daily | weekly | monthly | once} set trigger-hour <inetger> set trigger-minute <integer> set trigger-weekday {sunday | monday | tuesday | wednesday | thursday | friday | saturday} set trigger-day <integer> set trigger-datetime <YYYY-MM-DD HH:MM:SS> next end
trigger-frequency {hourly | daily | weekly | monthly | once} |
Set the scheduled trigger frequency (default = daily). |
trigger-hour <inetger> |
Set the hour of the day on which to trigger (0 - 23, default = 1), available for daily, weekly, and monthly schedule. |
trigger-minute <integer> |
Set the minute of the hour on which to trigger (0 - 59, default = 0), available for hourly, daily, weekly, and monthly schedule. |
trigger-weekday {sunday | monday | tuesday | wednesday | thursday | friday | saturday} |
Set the day of the week to trigger, available for weekly schedule. |
trigger-day <integer> |
Set the day within a month to trigger, available for monthly schedule. |
trigger-datetime <YYYY-MM-DD HH:MM:SS> |
Set the trigger time in YYYY-MM-DD HH:MM:SS format for one-time triggers. |
Example
In this example, an automation stitch is created to trigger a one-time configuration backup to a disk. The backup will occur August 5, 2022 at 4:00 AM.
To schedule a one-time automation stitch in the GUI:
-
Configure the trigger:
-
Go to Security Fabric > Automation, select the Trigger tab, and click Create New.
-
In the Miscellaneous section, click Schedule.
-
Enter a name (schedule-once) in the Name field.
-
In the Frequency dropdown list, select Once.
-
Select when the trigger will occur in the Date/Time fields.
-
Click OK.
-
-
Configure the stitch:
-
Go to Security Fabric > Automation, select the Stitch tab, and click Create New.
-
Enter the name, backup-once.
-
Click Add Trigger. Select schedule-once and click Apply.
-
Click Add Action. Select Backup Config Disk and click Apply.
-
Click OK. The backup configuration will occur once at the date and time you set.
-
To schedule a one-time automation stitch in the CLI:
-
Configure the trigger:
config system automation-trigger edit "schedule-once" set trigger-type scheduled set trigger-frequency once set trigger-datetime 2022-08-05 04:00:00 next end
-
Configure the action:
config system automation-action edit "Backup Config Disk" set description "Backup the configuration on disk." set action-type system-actions set system-action backup-config next end
-
Configure the stitch:
config system automation-stitch edit "backup-once" set trigger "schedule-once" config actions edit 1 set action "Backup Config Disk" set required enable next end next end
-
To view automation stitch information:
# diagnose test application autod 3 stitch: backup-once (scheduled) local hit: 0 relayed to: 0 relayed from: 0 last trigger: last relay: next scheduled trigger:Fri Aug 5 05:00:00 2022 actions: Backup Config Dis: done: 0 relayed to: 0 relayed from: 0 last trigger: last relay: logid to stitch mapping: id:0 (scheduled stitches) local hit: 0 relayed hits: 0 backup-once