LinuxQuestions.org
Review your favorite Linux distribution.
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, 09: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, 01:02 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
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, 05:08 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

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 07: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 07: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 01:57 AM
crontab vs cron.daily ? SheldonPlankton Linux - Newbie 1 07-16-2004 12:10 PM
Cron/Crontab Question cmfarley19 Linux - General 2 04-09-2003 01:09 PM
Cron/Crontab loocw Linux - General 2 03-08-2001 02:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:55 AM.

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
Open Source Consulting | Domain Registration