cron.daily stopped working
My daily weekly and monthly cron jobs recently stopped working. Around October 3. It looks like the jobs only run now if the computer is on at exactly 12AM. Is this the change that was discussed back in July, about run-parts? -a TW user
Am 17.10.21 um 20:50 schrieb JA McInnes:
My daily weekly and monthly cron jobs recently stopped working. Around October 3. It looks like the jobs only run now if the computer is on at exactly 12AM. Is this the change that was discussed back in July, about run-parts?
-a TW user
I noticed the same behavior here after the update from cronie-1.5.5-84.4 to cronie-1.5.7-85.1 (installed 09/06/21). The new syntax in /etc/crontab @hourly root run-parts /etc/cron.hourly @daily root run-parts /etc/cron.daily @weekly root run-parts /etc/cron.weekly @monthly root run-parts /etc/cron.monthly doesn't work here. System is switched on by BIOS at 2am (UTC) for daily backup and runs for 20-30 minutes, but no cron jobs are executed (also not during the day). So I went back to -*/15 * * * * root test -x /usr/libexec/cron/run-crons && /usr/libexec/cron/run-crons >/dev/null 2>&1 which works fine. "run-parts --test /etc/cron.daily/" shows all scripts in /etc/cron.daily (for some reason it will not show any file names containing a ".", so /etc/cron.daily "cron-script.sh" will not show up). Regards, Oliver -- PGP Public Key available at https://pgp.mit.edu/ Key fingerprint = 3264 280C 05B1 572F 3F0B 42B8 1E7B 2D9D 063B D507
On Mon, 2021-10-18 at 06:32 +0200, Oliver Schwabedissen wrote:
Am 17.10.21 um 20:50 schrieb JA McInnes:
My daily weekly and monthly cron jobs recently stopped working. Around October 3. It looks like the jobs only run now if the computer is on at exactly 12AM. Is this the change that was discussed back in July, about run-parts?
-a TW user
I noticed the same behavior here after the update from cronie-1.5.5- 84.4 to cronie-1.5.7-85.1 (installed 09/06/21). The new syntax in /etc/crontab @hourly root run-parts /etc/cron.hourly @daily root run-parts /etc/cron.daily @weekly root run-parts /etc/cron.weekly @monthly root run-parts /etc/cron.monthly doesn't work here. System is switched on by BIOS at 2am (UTC) for daily backup and runs for 20-30 minutes, but no cron jobs are executed (also not during the day).
Are you also referring to daily jobs when you say that they are not run during the day? Or there are some jobs in cron.hourly that are not executed?
So I went back to -*/15 * * * * root test -x /usr/libexec/cron/run-crons && /usr/libexec/cron/run-crons >/dev/null 2>&1 which works fine. "run-parts --test /etc/cron.daily/" shows all scripts in /etc/cron.daily (for some reason it will not show any file names containing a ".", so /etc/cron.daily "cron-script.sh" will not show up).
My guess is that cronie @daily executes jobs at midnight, hence they are not being executed at 2am. run-crons instead ran every 15 minutes and if more than a day has passed since a job had been executed, than cronie will run it.
Regards, Oliver
-- Best Regards Danilo Spinella Software Engineer in Packaging SUSE Software Solutions Italy Srl.
On Mon, Oct 18, 2021 at 5:18 AM Danilo Spinella
My guess is that cronie @daily executes jobs at midnight,
Yes that's what daily means.. old run-crons looks like a hack to me... What is needed here is a systemd timer that wakes the computer up, executes the script ..and cleanly gets it back to previous state.
On Mon, 2021-10-18 at 07:05 -0300, Cristian Rodríguez wrote:
On Mon, Oct 18, 2021 at 5:18 AM Danilo Spinella
wrote: My guess is that cronie @daily executes jobs at midnight,
Yes that's what daily means.. old run-crons looks like a hack to me...
What is needed here is a systemd timer that wakes the computer up, executes the script ..and cleanly gets it back to previous state.
No need to use systemd timers. Just switching to anacron would make it work. Regards, Danilo Spinella
On 18/10/2021 12.05, Cristian Rodríguez wrote:
On Mon, Oct 18, 2021 at 5:18 AM Danilo Spinella
mailto:danilo.spinella@suse.com> wrote: My guess is that cronie @daily executes jobs at midnight,
Yes that's what daily means.. old run-crons looks like a hack to me...
What is needed here is a systemd timer that wakes the computer up, executes the script ..and cleanly gets it back to previous state.
I don't like the idea of the computer waking up on its own. It can be a laptop, so wasting battery. Worse, the laptop can be in its bag, and burn in fire, because there is no cooling. A very windowsy idea. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On Mon, 18 Oct 2021 07:05:52 -0300 Cristian Rodríguez wrote:
Yes that's what daily means.. old run-crons looks like a hack to me...
What is needed here is a systemd timer that wakes the computer up, executes the script ..and cleanly gets it back to previous state.
would it not make more sense to use: ... [Timer] OnCalendar=daily Persistent=true ... in the timer definition? But I found this old blog post: https://spwhitton.name/blog/entry/systemdtimerpersistent/ I do not know if this is still valid. Then maybe systemd enable/start ...timer should just create the related timer stamp. Regards, Dieter
On Monday 2021-10-18 12:27, Danilo Spinella wrote:
On Mon, 2021-10-18 at 07:05 -0300, Cristian Rodríguez wrote:
On Mon, Oct 18, 2021 at 5:18 AM Danilo Spinella
wrote: My guess is that cronie @daily executes jobs at midnight,
Yes that's what daily means.. old run-crons looks like a hack to me...
What is needed here is a systemd timer that wakes the computer up, executes the script ..and cleanly gets it back to previous state.
No need to use systemd timers. Just switching to anacron would make it work.
No need to install cron when systemd is already there ;-)
On Mon, Oct 18, 2021 at 9:07 AM Carlos E. R.
I don't like the idea of the computer waking up on its own.
It can be a laptop, so wasting battery. Worse, the laptop can be in its bag, and burn in fire, because there is no cooling.
A very windowsy idea.
The OP is already waking up the computer using the BIOS alarm.. if it is a laptop on baterry then.. the service can be made to start only on acpower..
On 18/10/2021 14.44, Cristian Rodríguez wrote:
On Mon, Oct 18, 2021 at 9:07 AM Carlos E. R.
mailto:robin.listas@telefonica.net> wrote: I don't like the idea of the computer waking up on its own.
It can be a laptop, so wasting battery. Worse, the laptop can be in its bag, and burn in fire, because there is no cooling.
A very windowsy idea.
The OP is already waking up the computer using the BIOS alarm.. if it is a laptop on baterry then.. the service can be made to start only on acpower..
Huh? waking up the computer using the BIOS alarm? I missed that. Let me check... JAM> My daily weekly and monthly cron jobs recently stopped working. Around October JAM> 3. It looks like the jobs only run now if the computer is on at exactly 12AM. JAM> Is this the change that was discussed back in July, about run-parts? JAM> JAM> -a TW user No, he doesn't say anything about BIOS alarm, and he has not posted anything else, not in the last two months. IMNSHO, anything that boots or wakes up the computer by default at a certain hour, without explicitly asking the owner to allow this behaviour, is a terrible idea. Quick example of this very windowsy idea and problem: https://www.zdnet.com/article/windows-10-tip-keep-your-laptop-from-waking-up... Windows 10 tip: Keep your laptop from waking up in your travel bag | ZDNet Everyone who owns a laptop knows the feeling of reaching into a travel bag to discover that your PC woke up unexpectedly at some point, chewing through your battery without your knowledge. Here's how to prevent that from happening. ... -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On Mon, 2021-10-18 at 14:55 +0200, Carlos E. R. wrote:
On 18/10/2021 14.44, Cristian Rodríguez wrote:
On Mon, Oct 18, 2021 at 9:07 AM Carlos E. R.
mailto:robin.listas@telefonica.net> wrote: I don't like the idea of the computer waking up on its own.
It can be a laptop, so wasting battery. Worse, the laptop can be in its bag, and burn in fire, because there is no cooling.
A very windowsy idea.
The OP is already waking up the computer using the BIOS alarm.. if it is a laptop on baterry then.. the service can be made to start only on acpower..
Huh? waking up the computer using the BIOS alarm? I missed that. Let me check...
JAM> My daily weekly and monthly cron jobs recently stopped working. Around October JAM> 3. It looks like the jobs only run now if the computer is on at exactly 12AM. JAM> Is this the change that was discussed back in July, about run- parts? JAM> JAM> -a TW user
No, he doesn't say anything about BIOS alarm, and he has not posted anything else, not in the last two months.
Oliver Schwabedissen was talking about BIOS alarm.
IMNSHO, anything that boots or wakes up the computer by default at a certain hour, without explicitly asking the owner to allow this behaviour, is a terrible idea.
Quick example of this very windowsy idea and problem:
< https://www.zdnet.com/article/windows-10-tip-keep-your-laptop-from-waking-up...
Windows 10 tip: Keep your laptop from waking up in your travel bag | ZDNet
Everyone who owns a laptop knows the feeling of reaching into a travel bag to discover that your PC woke up unexpectedly at some point, chewing through your battery without your knowledge. Here's how to prevent that from happening.
...
Regards, Danilo Spinella
Am 18.10.21 um 14:44 schrieb Cristian Rodríguez:
On Mon, Oct 18, 2021 at 9:07 AM Carlos E. R.
wrote: I don't like the idea of the computer waking up on its own.
It can be a laptop, so wasting battery. Worse, the laptop can be in its bag, and burn in fire, because there is no cooling.
A very windowsy idea.
The OP is already waking up the computer using the BIOS alarm.. if it is a laptop on baterry then.. the service can be made to start only on acpower..
No, not the OP, *I* am using BIOS to wake up the PC (no laptop) in the night to backup local data to my NAS and run some other scripts.. Cron works fine using /usr/libexec/cron/run-crons. Will check anachron, as the system is not running 24/7. However, I need support for time zones in cron scripts as the backup should always start at 2am UTC (BIOS clock is running on UTC), although in live in CET (currently CEST). E.g. crontab for root contains entries like this: # Cron jobs UTC timezone CRON_TZ=':UTC' # Backup daily 05 2 * * * ... ... # Cron jobs Berlin timezone CRON_TZ=':Europe/Berlin' ... Not sure if anachron supports different time zones, though. Regards, Oliver -- PGP Public Key available at https://pgp.mit.edu/ Key fingerprint = 3264 280C 05B1 572F 3F0B 42B8 1E7B 2D9D 063B D507
On Mon, 18 Oct 2021, 22:05:21 +0200, Oliver Schwabedissen wrote:
[...] No, not the OP, I am using BIOS to wake up the PC (no laptop) in the night to backup local data to my NAS and run some other scripts..
Cron works fine using /usr/libexec/cron/run-crons. Will check anachron, as the system is not running 24/7. However, I need support for time zones in cron scripts as the backup should always start at 2am UTC (BIOS clock is running on UTC), although in live in CET (currently CEST).
E.g. crontab for root contains entries like this:
# Cron jobs UTC timezone CRON_TZ=':UTC' # Backup daily 05 2 * * * ... ...
# Cron jobs Berlin timezone CRON_TZ=':Europe/Berlin' ...
Not sure if anachron supports different time zones, though.
"cron" (== cronie) remains installed, so no need to worry. /etc/crontab will still be dealt with by "cron".
Regards,
Oliver
HTH, cheers. l9er manfred
On Tue 2021-10-19, Manfred Hollstein wrote:
[anachron] "cron" (== cronie) remains installed, so no need to worry. /etc/crontab will still be dealt with by "cron".
Interestingly 'yast timezone' wants to install chrony upon startup. Is this worth a report to converge on one (and switch YaST to work with cronie, too)? Gerald
On Thu, 21 Oct 2021, 12:51:32 +0200, Gerald Pfeifer wrote:
On Tue 2021-10-19, Manfred Hollstein wrote:
[anachron] "cron" (== cronie) remains installed, so no need to worry. /etc/crontab will still be dealt with by "cron".
Interestingly 'yast timezone' wants to install chrony upon startup.
Is this worth a report to converge on one (and switch YaST to work with cronie, too)?
huh? cronie != chrony! "cronie" is the "Cron Daemon", while "chrony" is the "System Clock Synchronization Client and Server".
Gerald
Cheers. l8er manfred
participants (9)
-
Carlos E. R.
-
Cristian Rodríguez
-
Danilo Spinella
-
dieter
-
Gerald Pfeifer
-
JA McInnes
-
Jan Engelhardt
-
Manfred Hollstein
-
Oliver Schwabedissen