LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-06-2009, 11:31 PM   #1
hattori.hanzo
Member
 
Registered: Aug 2006
Posts: 168

Rep: Reputation: 15
cron job running 12 hours off


I have a few cron jobs which used to run at the correct time but now they are 12 hours off. The system time is set to UTC.

The cron job schedules has not been changed. The date command is showing the time as UTC.

thanks & regards
 
Old 04-06-2009, 11:39 PM   #2
maxy7710
Member
 
Registered: Jan 2008
Location: Mumbai, india
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
Posts: 130

Rep: Reputation: 17
can you attache the logs from /var/log/cron, so that we can see whats going wrong.
also post u r crontab file.
 
Old 04-06-2009, 11:47 PM   #3
hattori.hanzo
Member
 
Registered: Aug 2006
Posts: 168

Original Poster
Rep: Reputation: 15
System time

Code:
[root@box log]# date
Tue Apr  7 04:43:08 UTC 2009
/var/log/cron

Note: the system time and timestamp in cron's log is different.

Code:
Apr  7 14:25:01 box crond[30730]: (root) CMD (php /var/www/html/syslog/scripts/reloadcache.php >> /var/log/php-syslog-ng/reloadcache.log)
Apr  7 14:30:01 box crond[30742]: (root) CMD (php /var/www/html/syslog/scripts/reloadcache.php >> /var/log/php-syslog-ng/reloadcache.log)
Apr  7 14:35:01 box crond[30756]: (root) CMD (php /var/www/html/syslog/scripts/reloadcache.php >> /var/log/php-syslog-ng/reloadcache.log)
Apr  7 14:40:01 box crond[30768]: (root) CMD (php /var/www/html/syslog/scripts/reloadcache.php >> /var/log/php-syslog-ng/reloadcache.log)
crontab

Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
MAILTO=root
HOME=/
#
0,5,10,15,20,25,30,35,40,45,50,55 * * * * php /var/www/html/syslog/scripts/reladcache.php >> /var/log/php-syslog-ng/reloadcache.log
 
Old 04-07-2009, 01:49 AM   #4
maxy7710
Member
 
Registered: Jan 2008
Location: Mumbai, india
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
Posts: 130

Rep: Reputation: 17
First of all simplyfy u r cron by using

*/5 * * * * php /var/www/html/syslog/scripts/reladcache.php >> /var/log/php-syslog-ng/reloadcache.log

above mentioned script will run every 5 mins

now can u attach /var/www/html/syslog/scripts/reladcache.php script for further review

one more thing, when u run

php /var/www/html/syslog/scripts/reladcache.php >> /var/log/php-syslog-ng/reloadcache.log

from command line, does everything works fine
 
Old 04-07-2009, 01:50 AM   #5
maxy7710
Member
 
Registered: Jan 2008
Location: Mumbai, india
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
Posts: 130

Rep: Reputation: 17
also attach this log

/var/log/php-syslog-ng/reloadcache.log
 
  


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
Running a Cron Job landysaccount Linux - Newbie 6 02-04-2009 05:29 PM
Cron running 4 hours late ResOrb Slackware 2 06-15-2007 07:45 AM
cron job not running vincebs Linux - Software 34 10-30-2004 01:27 PM
Cron job not running? james_cwy Linux - Newbie 6 12-14-2003 08:24 PM
Cron Job Not Running pzorn Linux - General 4 10-02-2003 01:38 PM


All times are GMT -5. The time now is 11:49 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