yo8192 / fcron

fcron is an advanced cron for Linux/Unix systems
http://fcron.free.fr
GNU General Public License v2.0
131 stars 12 forks source link

@first option in fcrontab giving error #9

Closed muralikodali closed 3 years ago

muralikodali commented 3 years ago

I have executed following command , which gave error message.

@first(5),mail(no) 60 "/usr/bin/offlineimap;/usr/local/bin/mu index -m /media/xxxx/lavendar/offmap/mail"

journalctl -u fcron.service shows following error :

an 02 20:00:04 sri fcron[396]: Error while setting next exe time for job '/usr/bin/offlineimap;/usr/local/bin/mu index -m /media/xxxx/lavendar/offmap/mail': cl_nextexe overflowed (case2). no (truncated)
Jan 02 20:00:04 sri fcron[396]: Setting cl_nextexe to now+cl_timefreq to prevent an infinite loop.
Jan 02 20:00:04 sri fcron[396]: next execution will now be at 1609601404.
yo8192 commented 3 years ago

The error message is truncated, but the full one would read:

                    error
                        ("Error while setting next exe time for job '%s': cl_nextexe"
                         " overflowed (case2). now=%lu, cl_timefreq=%lu, cl_nextexe=%lu. "
                         "Did fcron shut down cleanly?",
                         cl->cl_shell, now, cl->cl_timefreq, cl->cl_nextexe);

Was fcron shut down correctly before that message (so as it could save the fcrontabs before exiting)? e.g. you didn't have a system crash or similar did you?

Can you see messages similar to:

Jan 03 23:33:12 hostname fcron[3873152]: Saving systab...

before fcron started last?

If you believe fcron was shut down properly, then could you answer the few questions below:

  1. could you share the logs from (and including) the end of the previous fcron run, to (and including) that error message?
  2. Which version of fcron are you using, on which OS flavour and version (e.g. does it use systemd)
  3. do you have any '!' option before that job definition in your fcrontab? (e.g. would you be able to share the full fcrontab file)
  4. was this a one-off, or can you reproduce this?
muralikodali commented 3 years ago

fcron messages are logged to journal log. is there any configurable option to log messages to a separate file ?

muralikodali commented 3 years ago

In the past five days, I have not observed any error output. It looks like a one-off event.