Fortinet black logo

Administration Guide

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:
  1. Configure the trigger:

    1. Go to Security Fabric > Automation, select the Trigger tab, and click Create New.

    2. In the Miscellaneous section, click Schedule.

    3. Enter a name (schedule-once) in the Name field.

    4. In the Frequency dropdown list, select Once.

    5. Select when the trigger will occur in the Date/Time fields.

    6. Click OK.

  2. Configure the action:

    1. Go to Security Fabric > Automation, select the Action tab, and click Create New.

    2. In the General section, click System Action.

    3. Enter a name (Backup config disk) and an action description.

    4. In the Action dropdown list, select Backup configuration.

    5. Click OK.

  3. Configure the stitch:

    1. Go to Security Fabric > Automation, select the Stitch tab, and click Create New.

    2. Enter the name, backup-once.

    3. Click Add Trigger. Select schedule-once and click Apply.

    4. Click Add Action. Select Backup config disk and click Apply.

    5. 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:
  1. 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
  2. Configure the action:

    config system automation-action
        edit "Backup config disk"
            set description "Default automation action configuration for backing up the configuration on disk."
            set action-type system-actions
            set system-action backup-config
        next
    end
  3. 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
  4. 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 disk:
                            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

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:
  1. Configure the trigger:

    1. Go to Security Fabric > Automation, select the Trigger tab, and click Create New.

    2. In the Miscellaneous section, click Schedule.

    3. Enter a name (schedule-once) in the Name field.

    4. In the Frequency dropdown list, select Once.

    5. Select when the trigger will occur in the Date/Time fields.

    6. Click OK.

  2. Configure the action:

    1. Go to Security Fabric > Automation, select the Action tab, and click Create New.

    2. In the General section, click System Action.

    3. Enter a name (Backup config disk) and an action description.

    4. In the Action dropdown list, select Backup configuration.

    5. Click OK.

  3. Configure the stitch:

    1. Go to Security Fabric > Automation, select the Stitch tab, and click Create New.

    2. Enter the name, backup-once.

    3. Click Add Trigger. Select schedule-once and click Apply.

    4. Click Add Action. Select Backup config disk and click Apply.

    5. 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:
  1. 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
  2. Configure the action:

    config system automation-action
        edit "Backup config disk"
            set description "Default automation action configuration for backing up the configuration on disk."
            set action-type system-actions
            set system-action backup-config
        next
    end
  3. 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
  4. 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 disk:
                            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