Site Tools


one_off_reboot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
one_off_reboot [2021/08/28 19:07] hogwildone_off_reboot [2023/05/23 19:46] – -formatting hogwild
Line 1: Line 1:
-====== One-off reboot (or any command really) ======+====== Schedule a One-off Reboot (or any other command) ======
  
-What if you wanted to perform, for example, a restart of your hardware device? However, you might not want to perform that action until some conditions is met. For example, when users stop needing Internet connectivity.+What if you wanted to perform, for example, a restart of your hardware device? You might not want to perform that action until some conditions are met. For example, when users stop needing Internet connectivity.
  
-You might have noticed the option under Administration/Scheduler to reboot at a specific time. This is a periodic, permanent setting only, and will be saved in the device's configuration settings. A reboot at 5:00 AM might be executed more frequently than you might want.+You might have noticed the option under //Administration///[[admin-sched|Scheduler]] to reboot at a specific time. This is a periodic, permanent setting only. It will be saved in the device's configuration settings. A reboot at 5:00 AM might be executed more frequently than you wish.
  
-A simple solution to this is to have a reboot performed only once. FreshTomato includes a minified version of the Linux crontable command, called "cru".+A simple solution to this is to configure a reboot to be performed only once. FreshTomato includes a miniature version of the Linux crontable command, called "cru".
  
-The above can be done by adding a command directly into the crontable.+You can arrange the the above by adding a command directly into the crontable. 
 + 
 + \\
  
 For example: For example:
 +
 + \\
  
 <code -> <code ->
Line 15: Line 19:
 </code> </code>
  
- \\  This command would restart your device at 5:00 AM. The standard Unix cron syntax is used here: \\   [[https://en.wikipedia.org/wiki/Cron|cron]]+ \\ This command would restart your device at 5:00 AM.
  
-This will take effect on a running device, but is not saved permanently in the configurationThus, after a reboot, the scheduled activity will automatically disappear, which is the desired goal in this case.+The standard Unix cron syntax can be found here: [[https://en.wikipedia.org/wiki/Cron|cron]]
  
-If you need to remove the scheduled activity for whatever reason, before it is executed, use the following command:+This command will take effect on a running device, but would not be saved permanently in the configuration. Thus, after a reboot, the scheduled activity would automatically disappear, which in this case, is the desired result. 
 + 
 + \\ 
 + 
 +If you need to remove the scheduled activity before it is executed, use the following command: 
 + 
 + \\
  
 <code -> <code ->
Line 26: Line 36:
  
  \\  To verify the schedule, use the "l" (list) parameter to list scheduled cron jobs:  \\  To verify the schedule, use the "l" (list) parameter to list scheduled cron jobs:
 +
 + \\
  
 <code -> <code ->
 cru l cru l
 </code> </code>
 +
 + \\
 +
 + \\
  
  
one_off_reboot.txt · Last modified: 2023/05/23 19:47 by hogwild