Skip to main content
tpatel
Staff
Staff
August 25, 2025

Technical Tip: Automation stitch to reboot managed FortiSwitch from FortiGate

  • August 25, 2025
  • 1 reply
  • 1103 views
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

    Simple and easy to follow!