What would the best way to schedule a reboot during the weekend for freepbx?
Log into the console as root.
Use the command “at 10:30 PM Sunday”
This will drop you into the “line editor” prompt. In the line editor, type “shutdown -r now” or whatever command you want to execute.
The “at” command will only schedule a one off reboot so if you want a reoccurring reboot then use crontab.
For example, the following line added tk crontab would reboot the server at 4am every Monday morning:
0 4 * * 1 root reboot
(Minute, hour, day of month, month, day of week, user, command)
“At” is handy for scheduling the clicking of the apply changes button on the FreePBX GUI. For example, you would type “at 21:00” then “amportal a r” (use ^d to exit the at prompt) and that would apply your FreePBX changes and reload at 9pm as as you clicked the Red button. Use atq to view scheduled at commands and atrm (at remove) to cancel them.
Traditionally, the exit key is ^d. Ctrl q may work.
^q was a typo - I have updated my post, thank you
Do you mean each weekend?
If so, that’s overkill… Even a Windows PC/server doesn’t need to be rebooted so frequently…
If your system needs to be rebooted so frequently then something is leaking resources (memory, etc…) big time and needs to be fixed…
Have a nice day!