This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
one_off_reboot [2021/08/22 23:18] – hogwild | one_off_reboot [2024/10/31 21:41] (current) – hogwild | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== One-off | + | ====== |
- | You might want to perform, for example, a restart of your device. However, you might not be able to perform that action until a certain time, such as when users stop needing Internet connectivity, or until some other condition is met. | + | What if you wanted |
- | You might have noticed the option under Administration/ | + | You might have noticed the option under //Administration/ |
- | A simple solution to have a reboot performed | + | A simple solution |
- | < | + | You can arrange the the above by adding |
- | cru a reboot-one-off "0 5 * * * / | + | |
+ | \\ | ||
+ | |||
+ | For example: | ||
+ | |||
+ | \\ | ||
+ | |||
+ | <code -> | ||
+ | cru a reboot-one-off "0 5 * * * / | ||
</ | </ | ||
+ | |||
+ | \\ This command would restart your device at 5:00 AM. | ||
+ | |||
+ | It would take effect on a running device, but wouldn' | ||
+ | |||
\\ | \\ | ||
- | This command above will restart your device at 5am. The time syntax is the standard unix [[https:// | ||
- | 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!). | + | The standard Unix cron syntax can be found here: [[https:// |
- | 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 | + | If you need to remove the scheduled activity before it is executed, use the following command: |
+ | \\ | ||
+ | |||
+ | <code -> | ||
+ | cru d reboot-one-off | ||
</ | </ | ||
+ | |||
+ | \\ \\ To verify the schedule, use the " | ||
+ | |||
\\ | \\ | ||
- | to verify use: | ||
- | < | + | < |
cru l | cru l | ||
- | |||
</ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | \\ | ||