Hello, On Saturday 07 May 2005 08:17, Richard Bos wrote:
Op zaterdag 7 mei 2005 17:12, schreef Scott Leighton:
test -e $SPOOL/$BASE && { case $BASE in cron.hourly) TIME="-cmin +60 -or -cmin 60" ;; cron.daily) TIME="-ctime +1 -or -ctime 1" ;; cron.weekly) TIME="-ctime +7 -or -ctime 7" ;; cron.monthly) NOW=`date +%s` LASTMONTH=`date -d "last month" +%s` DIFF=`expr '(' $NOW - $LASTMONTH ')' / 86400` TIME="-ctime +$DIFF" ;; esac # remove all lock files for scripts that are due to run eval find $SPOOL/$BASE $TIME | \ xargs --no-run-if-empty rm }
I've stared and stared at it but can't see where it is bumping it by this weird 15 minute increase each day. Anyone have any clues?
It's already fixed for then next suse release ;)
Change:
cron.daily) TIME="-ctime +1 -or -ctime 1" ;; cron.weekly) TIME="-ctime +7 -or -ctime 7" ;;
to
cron.daily) TIME="-cmin +1440 -or -cmin 1440" ;; cron.weekly) TIME="-cmin +10080 -or -cmin 10080" ;;
I'm imagine I'm the only one careless enough to make the mistake I did in applying the fix Richard posted here, but in case you're having problems getting the cron jobs to run after doing so, I should point out that not only did the numbers change, but the "-ctime" was changed to "-cmin". For those not cognizant of the myriad of options to the "find" command (a real trove of useful stuff, by the way), -ctime and friends (-atime and -mtime) measure "time" in days (i.e., the time range is their arguments times 24 hours). The -amin, -mmin and -cmin counterparts measure time in minutes. That's a factor of 1440 difference!
... -- Richard Bos
Randall Schulz