Re: cron clarification

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



On Tue, Jan 01, 2008 at 04:08:17PM -0700, Joseph L. Casale wrote:
> What is the ramifications to simply placing scripts in the /etc/cron.hourly directory as opposed to actually adding jobs via the crontab -e method?
> Is there any significance to using one method versus the other?

If you don't need to run something at a specific time then cron.hourly
is easier and simpler.  Just drop the script into the directory.

If you need something at a specific time then look into /etc/cron.d/
which is similar to traditional crontab format, but again is simply a matter
of dropping files into that directory.
eg
  % cat /etc/cron.d/sysstat
  # run system activity accounting tool every 10 minutes
  */10 * * * * root /usr/lib/sa/sa1 1 1
  # generate a daily summary of process accounting at 23:53
  53 23 * * * root /usr/lib/sa/sa2 -A

Traditional crontab entries do still work, if you really want to deal
with that, but it's harder to automate install/uninstalls.

-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux