Site Tools


one_off_reboot

This is an old revision of the document!


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 currently periodic only and will be sabed in the device config. So a reboot at 5am will have to come with a frequency of execution which you might or might not want.

A simple solution to have a re boot 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
one_off_reboot.1598613921.txt.gz · Last modified: 2020/08/28 12:25 by rs232