Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-23-2009, 09:32 AM   #1
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
cronjob not working

hi all......

if i execute file: /home/vinay/new it will display date...

i have setup a cronjob like this..

crontab -e

*/1 * * * * /home/vinay/new

and it got installed............

i have started crond demon still it is not displaying date on each minute..

can anyone please help me why this is not working........

Thanks in advance.........
Old 06-23-2009, 10:02 AM   #2
Registered: Feb 2009
Distribution: CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 205

Rep: Reputation: 46
Just as a quick test, I created a test script and installed it using your cron line. It worked correctly. Here's the contents of my script:
date >> /tmp/
Old 06-23-2009, 10:03 AM   #3
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
if i execute file: /home/vinay/new it will display date...
Execute from a terminal? The output likely will be shown there.
The chronjob probably runs o.k. - you just don't see the output - because there is no terminal.
All just guessed not knowing anything about your program "new".
Old 06-23-2009, 10:06 AM   #4
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
It looks correct, provided that the file /home/vinay/new have executable permissions. Have you checked if some error message has been sent to your system mail? Or eventually redirect the standard output and the standard error to a file for checking:
*/1 * * * * /home/vinay/new > /home/vinay/cron.log 2>&1
Also check the file /var/log/cron to see if the cron job has been actually executed. You should see some entries like these:
Jun 23 16:02:01 linux crond[32620]: (vinay) CMD (/home/vinay/new)
Jun 23 16:03:01 linux crond[32626]: (vinay) CMD (/home/vinay/new)
Jun 23 16:04:01 linux crond[32630]: (vinay) CMD (/home/vinay/new)


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
Cronjob stops working after a while ToonM Slackware 4 01-23-2007 01:53 AM
Cronjob not working, stops at lynx prompt abefroman Linux - Server 3 11-01-2006 02:58 PM
Call of Duty 2 Cronjob Not working zend Linux - Software 3 11-15-2005 11:52 AM
cronjob not working but script works dtra Linux - Newbie 4 02-28-2005 06:05 PM
cronjob help meeh Linux - General 1 03-26-2004 12:41 PM

All times are GMT -5. The time now is 05:31 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration