LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2009, 10:50 PM   #1
cddot
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Differences between /etc/cron* and crontab -e


There seems to be two ways of specifying cronjobs.

One via creating a file in one of the /etc/cron.* directories. The other by using crontab -e.

Is one to be preferred over the other? If so, why? TIA.
 
Old 01-09-2009, 02:02 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,258

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Basically, the /etc/cron is for system level stuff, /var/spool/cron (or somewhere under /var depending on distro) is for individual users cron files. The latter should be created/amended via 'crontab -e', not directly edited.
HTH

PS here's a good page: http://www.adminschoice.com/docs/cro...Crontab%20file
 
Old 01-09-2009, 06:08 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,988

Rep: Reputation: Disabled
I guess the OP is referring to the directories e.g. SuSE has, like /etc/cron.daily, /etc/cron.hourly ... I never found any documentation concerning this.

<edit> It is described in the LSB (Linux Standard Base) documents or rather in the links from there to file system hierarchy / root file system / cron. But not how it is really used in easily understandable form. Ah, well... </edit>

For the normal use of cron you have to use crontab -e, since the resulting file holds more information than you can see in your editor.

If you have a workstation which is not running around the clock or want extended capabilities have a look at fcron (http://fcron.free.fr/).

Last edited by JZL240I-U; 01-09-2009 at 08:41 AM. Reason: see <edit> tags
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab -e vs /etc/cron.* rosv Debian 1 09-16-2008 08:39 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U SUSE / openSUSE 11 01-04-2007 02:57 AM
crontab vs cron.daily ? SheldonPlankton Linux - Newbie 1 07-16-2004 01:10 PM
Cron/Crontab Question cmfarley19 Linux - General 2 04-09-2003 02:09 PM
Cron/Crontab loocw Linux - General 2 03-08-2001 03:16 AM


All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration