Mailinglist Archive: opensuse (4570 mails)

< Previous Next >
Re: [SLE] 9.3 cron daily question
  • From: "Carlos E. R." <robin1.listas@xxxxxxxxxx>
  • Date: Mon, 28 Nov 2005 01:31:01 +0000 (UTC)
  • Message-id: <Pine.LNX.4.61.0511280157370.19105@xxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


The Monday 2005-11-28 at 00:05 +0100, Anders Johansson wrote:

> > I'll touch the flag file and see what happens:
> >
> > nimrodel:~ # touch --date="today 01:15:00"
>
> Note that touch doesn't set the ctime, just the mtime, so this won't have any
> effect.

Yes, I noticed that later.

> >
> > No! It is running again at 14:30. I think I will undo the changes to the
> > script, it is wrong: it is running every fifteen minutes:
> >
> > Nov 27 01:15:02 nimrodel run-crons[15358]: Starting cron daily run
> > Nov 27 14:00:01 nimrodel run-crons[20757]: Starting cron daily run
> > Nov 27 14:15:01 nimrodel run-crons[21710]: Starting cron daily run
> > Nov 27 14:30:02 nimrodel run-crons[22550]: Starting cron daily run
>
> This looks strange. Did you remove the section of run-crons which deletes the
> spool file?

No, only this change:


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="-ctime +7 -or -ctime 7" ;;
cron.monthly) NOW=`date +%s`
....


> Or did you put the line that outputs this message in the wrong place, so it
> gets printed every time run-crons runs instead of when cron.daily runs?

No, no. It is like this, and it has been there for months now:


# stage 2:
# run all scripts and collect output into one mail
# for each TIME_EXT with a meaningfull subject.
#
if [ ! -z "${RUN}" ] ; then
for EXT in ${RUN} ; do
#Cer
echo "Starting cron $EXT run"| $LOGGER -p info

CRONDIR="/etc/cron."${EXT}
....



In fact, it is so strange I did it again (the -cmin thing), exactly as
above, at about 00:05 hours. See what I get:

Nov 27 14:30:02 nimrodel run-crons[22550]: Starting cron daily run
Nov 28 00:15:01 nimrodel run-crons[4086]: Starting cron daily run
Nov 28 00:30:01 nimrodel run-crons[4960]: Starting cron daily run
Nov 28 00:45:01 nimrodel run-crons[5831]: Starting cron daily run
Nov 28 01:00:03 nimrodel run-crons[6663]: Starting cron daily run
Nov 28 01:15:02 nimrodel run-crons[8957]: Starting cron daily run
Nov 28 01:30:06 nimrodel run-crons[10591]: Starting cron daily run

At 1:35 I undid that change, and it hasn't run again. Now it is 02:24, it
would have run by now, and it hasn't: so there is something wrong in that
script.

Very strange!

- --
Cheers,
Carlos Robinson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFDil1ItTMYHG2NR9URAvA9AJ9RCndW+3uL+VzukGyS/8V/4KmrfgCeKHNb
jeWURq3qwEJOgsRPZ0NnJuo=
=t642
-----END PGP SIGNATURE-----


< Previous Next >
Follow Ups