Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 913 Bytes

schedule-daily-reboot.adoc

File metadata and controls

46 lines (36 loc) · 913 Bytes

Schedule daily reboot of Fortigate

Task: Reboot Fortigate daily at 02:00 at night.

  • Schedule every day at 02:00 at night as a trigger:

condfig sys automation-trigger
    edit "ScheduledReboot_trigger"
        set trigger-type scheduled
        set trigger-hour 2
        set trigger-minute 0
     next
end
  • Action to actually reboot the firewall, using the command exec reboot:

config sys automation-aciton
         edit "ScheduledReboot"
        set action-type cli-script
        set script "exec reboot"
        set accprofile "super_admin"
    next
end
  • Stitch to tie all the above:

config sys automation-stitch
    edit "ScheduledReboot_stitch"
        set trigger "ScheduledReboot_trigger"
        config actions
            edit 1
                set action "ScheduledReboot"
                set required enable
            next
        end
    next
end