Find the answer to your Linux question:
Results 1 to 3 of 3
Hello to All, I have some job in my crontab on my laptop : crontab -l 37 7 * * 1 /usr/local/bin/lico-update.sh -m I installed the package anacron on my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2008
    Location
    Luxembourg
    Posts
    136

    anacron not working ?


    Hello to All,

    I have some job in my crontab on my laptop :

    crontab -l
    37 7 * * 1 /usr/local/bin/lico-update.sh -m

    I installed the package anacron on my laptop because obviously it is not running 24/24h but only one or two hours per day.

    This job should run every Monday at 7h37 as setup in crontab.
    But indeed it is never executed.

    How to check anacron is running ?
    Something else is missing ?

    Thanks.
    Bye,
    Bruno

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    Anacron should not really be necessary for this situation.

    You should see something in the logs stating that the cronjob was executed (try /var/log/messages).

    I have never had any luck with personal crontabs. I just put them in /etc/crontab and they work. Anytime I mess with personal crontabs, I get burned like the way you are describing.
    linux user # 503963

  3. #3
    Linux Newbie
    Join Date
    Dec 2008
    Location
    Luxembourg
    Posts
    136

    [SOLVED] anacron not working ?

    Hello,

    I simply missed the following anacron configuration.

    In file /ect/anacrontab :
    7 15 lico-update.weekly /bin/sh /usr/local/bin/lico-update.sh -m

    This indicates that every '7' days, '15' minutes after anacron has been started, the script '/bin/sh lico-update.sh -m' will be executed.
    The 'param lico-update.weekly' is a unique job identifer to be used as a timestamp. See directory /var/spool/anacron for its usage.

    In /var/log/syslog :

    ..etc..
    anacron[2521]:Anacron 2.3 started on 2011-11-17
    anacron[2521]: Will run job `lico-update.weekly' in 15 min.
    ..etc..15 minutes later...
    anacron[2521]: Job `lico-update.weekly' started
    ..etc..

    Bye,
    Bruno

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •