[techtalk] cron.hourly vs cron.daily timing

Nancy Corbett nancy at netleaf.com
Tue May 29 13:03:48 EST 2001


It depends on how the cron is set up. The exact hour of the day is set
in the crontab file.  You can check it out yourself by entering crontab -e
at the command line.  It will bring up the list of scheduled cron jobs.
Below I have an example of how crons are scheduled.  There are 3 cron jobs
set up in the example for 1am, 2am and 3am, respectively, at exactly the
hour.  Since there is no designation for month, day or day of the week,
the cron will run every time the clock turns to 1, 2 or 3am.

Hope this helps.

Example:

# Six fields per line, as follows
#
#  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
0 1 * * * /test/nancy/bin/cleanlogfiledir      -P /test/nancy/outdir
0 2 * * * /test/nancy/bin/cleandatasourcefiles -P /test/nancy/outdir
0 3 * * * /test/nancy/bin/cleandatabasetables  -P /test/nancy/outdir


On Tue, 29 May 2001, David Merrill wrote:

> I'm configuring webalizer on my machine and am scheduling a cron job
> to process the web logs. I need to make sure the processing of web
> logs happens *before* the log rotator. The log rotator is called from
> a script in cron.monthly, and the log processor is going to be in
> cron.hourly (for now).
> 
> Can anyone tell me whether scripts in /etc/cron.hourly are guaranteed
> to run *before* those in cron.daily, and .daily before .weekly, etc.,
> etc.? The manpage for cron doesn't say anything about it.
> 
> TIA,
> 
> -- 
> Dr. David C. Merrill                     http://www.lupercalia.net
> Linux Documentation Project                   david at lupercalia.net
> Collection Editor & Coordinator            http://www.linuxdoc.org
>                                        Finger me for my public key
> 
> System going down at 1:45 this afternoon for disk crashing.
> 
> _______________________________________________
> techtalk mailing list
> techtalk at linuxchix.org
> http://www.linux.org.uk/mailman/listinfo/techtalk
> 





More information about the Techtalk mailing list