LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2003, 10:43 AM   #1
vasco1984
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Rep: Reputation: 0
Cron problem


Hi

I've a problem with cron.

i want to run updatedb every day. When i add it to /etc/crontab evrything works fine.
However when i add it to the root personal crontab-file (drontab -e)then just northing happens.

if i enter "crontab -l" i get:
40 * * * * /usr/bin/updatedb

It seems to me that cron i seeing the statement. However when the colck hits 40 minutes nothing happens.

anu suggestion as what i might do?
 
Old 11-22-2003, 10:48 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Welcome to LQ.

Try outputting a log file:
40 * * * * /usr/bin/updatedb 2>1 > /tmp/updatedb-cron.log

This will put all errors and command output into the log file.
 
Old 11-22-2003, 11:11 AM   #3
vasco1984
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Original Poster
Rep: Reputation: 0
ok

I did the log thing but theres nothing in the file! it is created but it is empty.
 
Old 11-22-2003, 11:55 AM   #4
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
Well I am no guru especially when it comes to cron but I would assume that means it is running. If it was executed and then subsequently the error log was created, I would guess that is proof positive? - again, though, guessing here.
 
Old 11-22-2003, 12:04 PM   #5
vasco1984
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Original Poster
Rep: Reputation: 0
your right (that must mean that im stupid )

top | grep updatedb

when the clock hits the crontab barier it shows up.
I didnt notice it was running cuz it is only running for an instance of a sec.
 
Old 11-22-2003, 12:07 PM   #6
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
unless you are constanly changing things in your file structure it will only update the small parts that have changed...believe me you are not dumb, it's the things that stare us in the face that are the hardest to figure out at times. Glad you got it!
 
  


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
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 09:09 AM
Cron Problem !!! lionking_x Linux - Newbie 6 12-13-2004 05:36 PM
cron problem... wrongman Linux - Software 3 06-06-2004 02:21 PM
[cron][mdk9.1]cron deamon seems to ignore some task... yannrichet Linux - Newbie 5 06-26-2003 10:57 AM
dual entries in cron log for cron.daily cpharvey Linux - General 3 02-27-2003 03:30 PM


All times are GMT -5. The time now is 02:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration