Re: cron, crontab, etc.
Hi folks,
On Tue, Jul 20, 1999 at 01:07:09PM +0100, Patrick Kirk wrote:
> I want to schedule a command to run updatebd every 6 hours. The man pages
> for cron and crontab don't have any useful info on how.
> How do I do this?
Add the following line to your crontab (use the crontab -e command):
0 0,6,12,18 * * * /where/ever/updatedb/lives
The format is:
minute (0-59),
hour (0-23),
day of the month (1-31),
month of the year (1-12),
day of the week (0-6 with 0=Sunday),
command to be run.
"*" stands for "any value".
The above example runs the command /where/ever/updatedb/lives
every day of the month, every month of the year, every day of the week,
at the hours 0:00 (midnight) 6:00, 12:00, 18:00 (6:00pm).
You may need to set the path in updatedb explicitly, I don't know the
script's internals.
I don't have a Debian box handy - maybe you need to look at the manpage
in section 5 (file formats) of the manual:
man 5 crontab
The basic format should be described in both the crontab(1) and the
crontab(5) manpages.
So long -- Stephan
--
Stephan Engelke engelke@math.uni-hamburg.de
*** Siehst Du die Gräber dort hinterm Strauch?
Sie rauchten nicht - und starben auch! ***
Reply to: