Mailinglist Archive: opensuse (3349 mails)

< Previous Next >
Re: [SLE] 9.3 cron.daily run time
  • From: Ken Schneider <suse-list@xxxxxxxxxxxxx>
  • Date: Sat, 07 May 2005 12:12:53 -0400
  • Message-id: <1115482373.25076.22.camel@xxxxxxxxxxxxxxxxx>
On Sat, 2005-05-07 at 17:17 +0200, 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" ;;
>
>
> > And, how do I get cron.daily back to running at a reasonable
> > time, like 4am or 5am in the morning?
>
> touch "with your timestamp" /var/spool/cron/lastrun/cron.daily
What ever happened to using the system clock to schedule cron jobs?
Seemed to work correctly for how many years? Now you schedule based on
how long ago a file was created which is rather short sighted to me.
Like I have said in the past
If it aint broke, don't fix it (break it)

--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998

"The day Microsoft makes something that doesn't suck is probably
the day they start making vacuum cleaners." -Ernst Jan Plugge


< Previous Next >