anacron job update problem

From: Mike Ballard (dont_w_at_nt_spam.org)
Date: 09/30/03


Date: Tue, 30 Sep 2003 03:02:22 GMT


Tried emailing the names in man page but either bounce or no response. I
like anacron but not the way it decides a job has run.

For one thing, it seems an outright failure doesn't stop anacron from
touching the job name and thereby putting off running it again until the
next scheduled try. I don't understand that.

I have a job to check yahoo mail every couple days but to be successful it
requires my machine be online (which it isn't always). So I have this
anacron job:

3 45 yahoo_mail /usr/bin/pgrep pppd && /usr/local/bin/yahoo_mail > /dev/null 2>&1

What happens is whether I'm online or not, anacron runs it and touches the
job in /var/spool. I only want it to update the timestamp if it ran
successfully (logged onto yahoo, unread mail or not). This is what
/var/log/cron shows:

    anacron[3334]: Job `yahoo_mail' started
    anacron[3334]: Job `yahoo_mail' terminated (exit status: 1)
    anacron[3334]: Normal exit (1 jobs run)

It looks to me like yahoo_mail failed but anacron touched the job name and
exited. So how can I either change the above anacrontab job or get
anacron to only update the job name according to some success parameter I
define?

Mike

-- 
mike.ballard--at--earthlink.net
  "Roses are red, violets are blue,
   I'm schizophrenic and so am I"

Quantcast