[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: using crontab..?



On Fri, 27 Aug 1999, Claudius Li wrote:

> On Fri, 27 Aug 1999, Matt Lemsing wrote:
> 
> > basic question..as root - how do i add a Cron entry and what does the
> > file have to look like...
> > 
> > Matt
> 
> In /etc you will find a file called crontab. Do not edit this file, but
> take a look at it. It calls several other files at the appropriate times.
> Instead edit cron.hourly, cron.daily, cron.weekly, cron.monday etc.
> These directories and anything in them gets run as specified in
> /etc/crontab
> Just put links to your programs in these directories and cron will run
> them when apropriate.
> 

You can also add an entry on the fly with 'crontab -e' for jobs that don't
fit into the /etc/crontab* scheme.  Note that it will invoke an editor for
you to add some entries -- if you don't like 'vi' then make sure that the
EDITOR variable is set to 'pico' first; for example:

export EDITOR=pico

Inside the editor you can place comments (start with '#') and specify
jobs and times; for example here is one of my entries (ie. not root's).
See the man-page on crontab.

## start setiathome at 19:05
5 19 * * * /home/me/bin/seti start
## stop it at 9:05 from monday thru friday
5 9  * * 1-5 /home/me/bin/seti stop
#
## change signature every 5 min between 8 and 23:00 hrs.
0-59/5 8-23 * * * /home/me/bin/changeSig >/dev/null 2>/dev/null

-- 
denice.deatrich @ NospaM.epfl.ch, EPFL - LCAV / LCM    PH: +41 (21) 693-5643
                  (If replying by email please remove 'NospaM' from address.)
<*> This moment's fortune cookie:
Today is the first day of the rest of your lossage.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]