Fortinet black logo

Administration Guide

Schedule a script

Schedule a script

Scripts and script groups can be scheduled to run at a specific time or on a recurring schedule. This option must be enabled in the CLI before it is available in the GUI.

note icon

Schedules cannot be used on scripts with the target Policy Package or ADOM Database.

To enable script scheduling:
  1. Go to System Settings > Dashboard and click in the CLI Console widget, or connect to the FortiManager with terminal emulation software.
  2. Enter the following CLI commands:

    config system admin setting

    set show_schedule_script enable

    end

To schedule a script or script group:
  1. Go to Device Manager > Scripts, or Policy & Objects > Object Configuration > Advanced > Scripts if you are in the Global Database ADOM.
  2. Right-click on the script or group and select Schedule Script, or select a script or group then click Schedule Script or More > Schedule Script in the toolbar. The Schedule Script window opens.
  3. Configure the following options, then click OK to create the schedule:

    Devices

    Select the devices that the script will be run on. If required, use the search field to find the devices in the list.

    Enable Automatic execute after each device install

    Select to enable automatic execution of the script or script group after each device install. If this is selected, no schedule can be created.

    This option is only available is the target is Remote FortiGate Directly (via CLI).

    Enable Schedule

    Select to schedule when the script or groups runs.

    This option is only available is the target is Remote FortiGate Directly (via CLI).

    Recurring

    Select how frequently the script or script group will run:

    • One Time- Set the date and time that script or group will run.
    • Daily - Set the time that the script or group will run everyday.
    • Weekly - Set the day of the week and the time of day that the script or group will run.
    • Monthly - Set the day of the month and the time of day that the script or group will run.

Schedule a script

Scripts and script groups can be scheduled to run at a specific time or on a recurring schedule. This option must be enabled in the CLI before it is available in the GUI.

note icon

Schedules cannot be used on scripts with the target Policy Package or ADOM Database.

To enable script scheduling:
  1. Go to System Settings > Dashboard and click in the CLI Console widget, or connect to the FortiManager with terminal emulation software.
  2. Enter the following CLI commands:

    config system admin setting

    set show_schedule_script enable

    end

To schedule a script or script group:
  1. Go to Device Manager > Scripts, or Policy & Objects > Object Configuration > Advanced > Scripts if you are in the Global Database ADOM.
  2. Right-click on the script or group and select Schedule Script, or select a script or group then click Schedule Script or More > Schedule Script in the toolbar. The Schedule Script window opens.
  3. Configure the following options, then click OK to create the schedule:

    Devices

    Select the devices that the script will be run on. If required, use the search field to find the devices in the list.

    Enable Automatic execute after each device install

    Select to enable automatic execution of the script or script group after each device install. If this is selected, no schedule can be created.

    This option is only available is the target is Remote FortiGate Directly (via CLI).

    Enable Schedule

    Select to schedule when the script or groups runs.

    This option is only available is the target is Remote FortiGate Directly (via CLI).

    Recurring

    Select how frequently the script or script group will run:

    • One Time- Set the date and time that script or group will run.
    • Daily - Set the time that the script or group will run everyday.
    • Weekly - Set the day of the week and the time of day that the script or group will run.
    • Monthly - Set the day of the month and the time of day that the script or group will run.