Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-18-2003, 08:52 AM   #1
Registered: Oct 2003
Posts: 40

Rep: Reputation: 15
Question system-wide crontab in /etc/crontab

well, I am trying to set up system-wide crontab, but it does not seem to work.
I have created a script:

du -s /home/* | sort -nr | head -n 5

I also edited the /etc/crontab:

00-59 * * * * /home/user/script 2>&1 > /home/user/logfile

but it doesn't seem to be doing anything... Am I overlooking something?
I even tried to put the command straight in the crontab file:

00-59 * * * * du -s /home/* | sort -nr | head -n 5 >> /home/user/file

and I get no output, eventhough similar command works fine on the user crontab...

Last edited by ner; 11-18-2003 at 11:11 AM.
Old 11-18-2003, 11:45 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
I find that systemwided crontab entries generally work better and are less of a hassle if you add them to root's crontab instead of messing with the configs in /etc/crontab. Perhaps that's not the answer you were looking for but that's the way I avoid trouble.

Old 11-18-2003, 12:35 PM   #3
Registered: Oct 2003
Posts: 40

Original Poster
Rep: Reputation: 15
yeah, I know it would be easier, but there should be a way to make the /etc/crontab changes and make it work...


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab x2??? killahsmurf Slackware 2 05-24-2005 10:53 PM
system backup using crontab goodolday Linux - General 1 04-26-2005 04:28 PM
Crontab reynacho_au Linux - Software 6 12-28-2004 03:09 AM
crontab help davsingl67 Linux - General 5 12-13-2002 06:07 AM
Where's my crontab? fxlee Linux - Newbie 2 01-30-2002 06:38 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:41 PM.

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