Skip to main content
gmanea
Staff
Staff
Sep 22, 2009 12:09 PM UTC

Using Automation Stitch to schedule restart (reboot) FortiGate

  • Nov 9, 2026 7:34 AM UTC
  • 0 replies
  • 108808 views
  • Translate All

Description

How to set up FortiGate to reboot at a predefined time.

Scope

FortiGate

Solution

Automation stitch reboot.

The option presents integration with the operational level of the network. 

An action can be triggered based on specific predefined triggers.

 

In this example, a periodic reboot not triggered by a specific event has been used. Instead, configure a scheduled reboot.

 

Note:

Use short, simple names, and preferably no spaces (if used, use a colon in the CLI) in the name field.

 

  1. Security Fabric -> Automation -> Create New


d989c55f.webp


  1. Select Schedule


948fa4fd.webp


  1. Frequency can be set according to the requirement


9ce6b8f9.webp


  1. Add Action with a CLI Script


44c92628.webp



bda61011.webp


  1. Select super_admin


6335a02b.webp


  1. Test Automation Stitch


d9c0ab06.webp

 

The CLI commands created by this action:

config system automation-trigger
    edit "Weekly Reboot"
        set trigger-type scheduled
        set trigger-frequency weekly
        set trigger-weekday sunday
        set trigger-hour 23
        set trigger-minute 1
    next
end
config system automation-action
    edit "Reboot"
        set action-type cli-script
        set script "execute reboot"
        set accprofile "super_admin"
    next
end
config system automation-stitch
    edit "Weekly Reboot"
        set trigger "Weekly Reboot"
        config actions
            edit 1
                set action "Reboot"
                set required enable
            next
        end
    next
end

    

 

Note:

FortiGate's built-in automation scheduler allows for specifying a day of the month (e.g., the 3rd), but not the day of the week (e.g., every second Tuesday)

If the FortiGate is set up in HA, additional configuration is required to reboot the cluster: Technical Tip: Automate the scheduling of reboots for the HA cluster using an automation stitch

 

 

From FortiOS version 7.2 onward, there is a new action type 'system action' which can be used to reboot, shut down, or back up the config of the FortiGate. Refer to this document for more details: System automation actions to back up, reboot, or shut down the FortiGate

 

1deb026c.webp

 

Note:

Starting from FortiOS version 8.0.1, the auto-script engine only allows information-gathering commands (get, diagnose); 'execute' commands are not permitted in auto-script. Thus, it is expected that the reboot command will fail during the execution of this script


Related articles:

Technical Tip: Using Automation Stitch to schedule restart (reboot) FortiGate

Technical Tip: How to check why automation stitch is not working as expected

Technical Tip: How to check why automation stitch is not working as expected

Technical Tip: How to properly shut down or reboot a FortiGate

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024