Skip to main content
tpatel
Staff
Staff
Aug 25, 2025 4:26 AM UTC

Technical Tip: Automation stitch to reboot managed FortiSwitch from FortiGate

Description This article describes how to configure the automation stitch to reboot the managed FortiSwitch daily at a desired time.
Scope FortiGate.
Solution

Here are the CLI script to configure this automation stitch for 1:00am specific time and date:

Step 1 (Automation Action):

config system automation-action

    edit "Restart_FortiSwitch_action"

        set action-type cli-script

        set script "execute switch-controller switch-action restart swtp all"

        set accprofile "super_admin"

    next

end

 
auto_action.png

 



Step 2 (Automation Trigger):

 

config system automation-trigger

    edit "restart_FortiSwitch_trigger"

         set trigger-type scheduled
         set trigger-frequency once
         set trigger-datetime 2025-08-26 01:00:00 <----- Scheduled for 1:00 am, this can be changed as desired.

    next

end

 

auto_trigger.png

 

Step 3 (Automation Stitch):

config system automation-stitch

    edit "Restart_FortiSwitch_stitch"

       set trigger "restart_FortiSwitch_trigger"

           config actions

              edit 1

                  set action "Restart_FortiSwitch_action"

                  set required enable

              next

           end

    next

end

 

auto_stitch.png

 

Note:

  • To reboot a specific FortiSwitch by name , replace the script with 'execute switch-controller switch-action restart swtp switch-id <switch1>'.
  • To restart multiple FortiSwitches (and not all), the command is 'execute switch-controller switch-action restart swtp switch-group <switch-group ID>'. 

Related document:
Execute switch-controller

    1 reply

    JKabaci
    Explorer
    May 26, 2026 8:28 PM UTC

    Simple and easy to follow!

    Translate
    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