FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 01-01-2008, 10:08 PM
"Joseph L. Casale"
 
Default cron clarification

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?

Thanks!
jlc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-01-2008, 10:13 PM
"Jim Perrin"
 
Default cron clarification

On Jan 1, 2008 6:08 PM, Joseph L. Casale <jcasale@activenetwerx.com> 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?

Using /etc/cron.hourly is better for applications which use cron jobs.
When you install the application, it just has to drop a file in a
directory rather than parsing a particular user's crontab. It also
provides a central location to look for jobs, rather than parsing a
number of different user files to figure out your hourly tasks (for
system user tasks, not actual people tasks).


--
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-01-2008, 10:28 PM
Stephen Harris
 
Default cron clarification

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@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org