Site Tools


One-off reboot (or any command really...)

You might find yourself in the position where you need to e.g. restart your device but you're not able to do so until a certain time because users need Internet connectivity or else…

You might have noticed under Administration/Scheduler an option to reboot at specific time however this is a periodic setting only and will be saved in the device config. So a reboot at 5am will have to come with a frequency of execution which you might not want.

A simple solution to have a reboot performed once only is to add a command directly into the contable e.g.:

cru a reboot-one-off "0 5 * * * /sbin/reboot"

This command above will restart your device at 5am. The time syntax is the standard unix cron one.

NOTE: this is effective on a running device but not saved permanently anywhere in the config, hence after reboot the sheduled activity will automatically disappear (good!).

If you need to remove the scheduled activity for whatever reason, before it is executed, just use the following command:

cru d reboot-one-off

to verify use:

cru l
one_off_reboot.txt · Last modified: 2020/08/28 12:43 by rs232