Mailinglist Archive: opensuse (3349 mails)

< Previous Next >
Re: [SLE] 9.3 cron.daily run time
  • From: Richard Bos <radoeka@xxxxxxxxx>
  • Date: Sat, 7 May 2005 17:17:30 +0200
  • Message-id: <200505071717.30758.radoeka@xxxxxxxxx>
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

--
Richard Bos
Without a home the journey is endless


< Previous Next >
References