Results 1 to 9 of 9

Thread: cron jobs not running

  1. #1
    Join Date
    Apr 2014
    Location
    "Great North Wet"
    Posts
    133

    Default cron jobs not running

    For some reason cron stopped executing the jobs in my crontab a few days ago
    I checked systemctl and also journalctl and it shows cron running ok
    I then inserted (via crontab -e as root) an echo "hi" to run each minute
    That works
    But if i then copy it to the next line (again using crontab -e as root) that second one doesnt run at all
    so this is the crontab (there is more following the echo 2)
    * * * * * echo "run 1"
    * * * * * echo "run 2"

    and only echo "run 1" works, echo "run 2" does not
    I test by checking my mail
    I uninstalled and reinstalled cron and no-dice, still the same
    rebooted too, again no change
    While in crontab -e i did a :set invlist to check for stray characters - nothing
    I made sure the crontab ended with a blank line too
    Any ideas?

    I am running latest zypper dup and have always rebooted after it updated
    Turkey Creek Jack Johnson: Nobody move!
    Doc Holliday: Nonsense. By all means, move.

  2. #2
    Join Date
    Jan 2018
    Location
    Canada
    Posts
    123

    Default Re: cron jobs not running

    I encountered the same issue. It is my root jobs entered using crontab -e that don't run; the ones the system uses do show up in the journal. I believe there was an update to a cron package recently. I looked at bugzilla and didn't see anything reported.

    I only had 8 cron jobs so I moved them over to systemd timers.

  3. #3
    Join Date
    Apr 2014
    Location
    "Great North Wet"
    Posts
    133

    Default Re: cron jobs not running

    The first job cron encounters (whatever the crontab) seems to be run but none after that
    I'm stumped - unless the cron code changed, that could explain it, but I would expect a lot more complaints if that's the case.
    Turkey Creek Jack Johnson: Nobody move!
    Doc Holliday: Nonsense. By all means, move.

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: cron jobs not running

    Quote Originally Posted by erbenton View Post
    The first job cron encounters (whatever the crontab) seems to be run but none after that
    I'm stumped - unless the cron code changed, that could explain it, but I would expect a lot more complaints if that's the case.
    Looks very clear like a bug to me.

    The sooner you report it, the sooner it will be repaired.
    Henk van Velden

  5. #5
    Join Date
    Apr 2014
    Location
    "Great North Wet"
    Posts
    133

    Default Re: cron jobs not running

    I'm narrowing it down to the simplest use case i can come up with. I also want to be able to describe the behavior exactly and provide con logs with debug enabled. So i plan to file a bug on this tomorrow or the day after unless someone posts something here like "hey, you need to do X Y Z and it will work again" in the next day or so. I'm just kinda surprised, if its a real bug, that I can only find 2 people (myself and doscott (above) ) who have encountered it, google revealed nothing of much use. I had to download the source code and browse it to figure out how the cron debug flags worked.
    What I found so far is that a one liner crontab gets executed but never any lines after that and /etc/crontab is ignored entirely.
    Turkey Creek Jack Johnson: Nobody move!
    Doc Holliday: Nonsense. By all means, move.

  6. #6
    Join Date
    Jan 2018
    Location
    Canada
    Posts
    123

    Default Re: cron jobs not running


  7. #7
    Join Date
    Apr 2014
    Location
    "Great North Wet"
    Posts
    133

    Default Re: cron jobs not running

    Great! I'll just add a comment to it.
    Thanks
    Turkey Creek Jack Johnson: Nobody move!
    Doc Holliday: Nonsense. By all means, move.

  8. #8
    Join Date
    Oct 2014
    Location
    Rotterdam
    Posts
    147

    Default Re: cron jobs not running

    Checking cronie, I see a patch for the problem is already committed to the upstream project:

    2019-03-18 Tomas Mraz <tmraz@fedoraproject.org>

    * crond: Fix regression from last release
    Only first job from a crontab was being run.
    See https://github.com/cronie-crond/cron...ster/ChangeLog

  9. #9
    Join Date
    Apr 2014
    Location
    "Great North Wet"
    Posts
    133

    Default Re: cron jobs not running

    I just tested the latest (v1.5.4) change from git - looks like it works as it should now, but I'm waiting for the tumbleweed release which should be available soon
    Turkey Creek Jack Johnson: Nobody move!
    Doc Holliday: Nonsense. By all means, move.

Tags for this Thread

Posting Permissions

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