[WBEL-users] Cron Job help

Luke Scharf lscharf at aoe.vt.edu
Thu Apr 14 13:47:58 CDT 2005


Mike Chapman wrote:

> Would someone be willing to assist me with setting up a Cron job that 
> would reboot my box on a monthly schedule? I have Googled for help and 
> found examples but I am perplexed with the syntax. I tried to use 
> Webmin to do this but could not ( each time I would try to run the job 
> I was informed I needed to run the job as a superuser...). Newbie 
> instructions would be greatly appreciated.
>  

Here are the steps I would follow:

   1. $ su - root
      You have to be root to reboot the box and to edit root's crontab.
   2. # export EDITOR=an_editor_you_like
      Default on WBEL is vim.  If you like vim, you can skip this step. 
      If you're not familiar with vi, then you'll really want to set it
      to an editor like nano, jed, or emacs.
   3. # crontab -e
      This will open the contab editor.
   4. Add "@monthly /sbin/reboot" to the bottom of the file.  Also, put
      some comments in to tell everyone who might possibly ever
      administer the box what you intended to do, and why.
   5. Save and exit from the text editor.
   6. Plan to have the machine reboot at midnight on the 31st or 1st of
      the month.

I hope this helps!
-Luke

-- 
Luke Scharf, Systems Administrator
Virginia Tech Aerospace and Ocean Engineering



More information about the Whitebox-users mailing list