On Sunday 14 August 2005 6:57 pm, Lucky Leavell wrote:
On Sat, 13 Aug 2005, Robert Paulsen wrote:
On Saturday 13 August 2005 05:46, Lucky Leavell wrote:
On Mon, 8 Aug 2005, Scott Leighton wrote:
On Monday 08 August 2005 7:13 pm, Lucky Leavell wrote:
OS: SuSE 9.3 Pro
I found my cron.daily files were running at all sorts of times of day in 9.3 (several systems) and finally found a message posted earlier this year that told how to fix it by removing the /var/spool/cron/lastrun/cron.daily file at the time you wanted it to run - one minute. I set mine to run at 4:00 AM (0800 UTC) and it did so the first day but then ran at 0415 the second day, 0430 the third, etc.
What causes this creep? Am I going to have to run a cron.weekly job to reset cron.daily?
It's a known problem. Check the archives for a solution.
http://lists.suse.com/archive/suse-linux-e/2005-May/1097.html
OK, I did that and reset the time to run at 3AM (0700 UTC) but now I find cron.daily has not run since.!?
The whole solution is not given in any one message. You need to look at the whole thread to figure it out. Taken together, the following two messages explain what needs to be done...
After making the changes to /usr/lib/cron/run-crons shown in: http://lists.suse.com/archive/suse-linux-e/2005-May/1096.html
run the "at" command in: http://lists.suse.com/archive/suse-linux-e/2005-May/1112.html (Adjust tim to your liking.)
The trick is to remove the file /var/spool/cron/lastrun/cron.daily one minute before the time at which you want the daily cron job to run.
I did that after editing the /usr/lib/cron/run-crons file as indicated in the same thread. I even tried restarting cron BUT cron.daily still won't run after the first time after removing the /var/spool/cron/lastrun/cron.daily file.
If this is supposed to be easier than the old crontab, it isn't!
Thnak you , Lucky
Are you absolutely positive you changed /usr/lib/run-crons to match what was posted in the thread, in particular you needed to catch those instances that changed to -cmin from -ctime test -e $SPOOL/$BASE && { case $BASE in cron.hourly) TIME="-cmin +60 -or -cmin 60" ;; cron.daily) TIME="-cmin +1440 -or -cmin 1440" ;; cron.weekly) TIME="-cmin +10080 -or -cmin 10080" ;; cron.monthly) NOW=`date +%s` LASTMONTH=`date -d "last month" +%s` DIFF=`expr '(' $NOW - $LASTMONTH ')' / 86400` TIME="-ctime +$DIFF" ;; esac Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.8-default x86_64 SuSE Linux 9.3 (x86-64)