User Tools

Site Tools


the_ntp_functions

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
the_ntp_functions [2017/03/18 13:20] – [to do] walkeradminthe_ntp_functions [2017/03/18 13:25] – [to do] walkeradmin
Line 277: Line 277:
 \\  \\ 
  
 +
 +
 +
 +To use cron (should already be installed):
 +\\ 
 +\\ 
 +    sudo crontab -e (reboots require super user rights)
 +\\ 
 +\\ 
 +Insert the following line:
 +\\ 
 +\\ 
 +    0 0          /sbin/shutdown -r
 +\\ 
 +\\ 
 +Explanation:
 +\\ 
 +\\ 
 +<file>
 +m      h    dom        mon   dow       command
 +minute hour dayOfMonth Month dayOfWeek commandToRun
 +
 +
 +so the line 
 +  0 0          /sbin/shutdown -r
 +
 +
 +would reboot your system every day at 00:00.
 +</file>
 +
 +
 +Ctrl+X, Y, Enter should get you out of crontab (if using nano)
 +
 +Note: you might have to run crontab -e as root, because shutdown needs root.
 + 
  
  
  
the_ntp_functions.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1