Hi,
since my update to Leap 16 my weekly cronjobs placed in /etc/cron.weekly are not executed any more. The cron service is running, but nothing happens.
I used standard Leap 15.x mechanism to execute crons by /var/spool/cron/lastrun/cron.weekly
I now read that cron is old way of doing and a better solution is timer units with systemd.
So, is cron still working but needs to be configured different on Leap 16 or is it better to move to systemd?
Any hint ?
Thank you!
hcvv
October 20, 2025, 4:05pm
2
As far as I know, systemd simply interprets the cron configurations. But I vaguely remember that there was another thread about problems with daily and/or weekly runs. Try to search for it.
@sirtoby :
Helping Henk with his memory –
Also, these URLs –
1 Like
Show
cat /etc/crontab
ls -lZ /etc/crontab
ls -lRZ /etc/cron.weekly
That is wrong.
sirtoby
October 21, 2025, 11:21am
5
linux:~ # cat /etc/crontab
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
@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
linux:~ # ls -lZ /etc/crontab
-rw------- 1 root root ? 720 Jul 9 2024 /etc/crontab
linux:~ # ls -lRZ /etc/cron.weekly
/etc/cron.weekly:
total 32
-rwxrwxr-x 1 st users ? 902 Aug 12 2018 1-backup.sh
-rwxrwxr-x 1 st users ? 1627 Oct 20 17:01 2-backup.sh
-rwxrwxr-x 1 st users ? 1132 Aug 19 2018 3-backup.sh
-rwxr-xr-x 1 st users ? 967 Aug 12 2018 4-backup.sh
-rwxr-xr-x 1 st users ? 725 Aug 12 2018 5-backup.sh
-rwxr-xr-x 1 st users ? 740 Aug 12 2018 6-backup.sh
-rwxr-xr-x 1 st users ? 344 Aug 11 2017 7-journal-vacuum.sh
-rwxr-xr-x 1 root root ? 354 Aug 11 2019 8-empty-tmp.sh
linux:~ # ls -lZ /var/spool/cron/lastrun/cron.weekly
-rw-r--r-- 1 root root ? 0 Sep 28 02:15 /var/spool/cron/lastrun/cron.weekly
sirtoby:
1-backup.sh
SUSE switched to using run-parts and by default it ignores files with . in the name. See man run-parts.
You can always manually test what happens
run-parts --test --debug /etc/cron.weekly
1 Like
@sirtoby :
Also, please check the differences between /etc/sysconfig/cron and /usr/share/fillup-templates/sysconfig.cron …
The upgraded “cronie” package had possibly not updated the cron configuration in /etc/ correctly …
1 Like
Thank you I changed that. They seem now to be executed by run-parts
I copied one in cron.hourly and cron.daily to check what will happen.
sirtoby
October 21, 2025, 1:46pm
10
Thank you.
The files seem to be the same.
In /etc/sysconfig/cron there are only two additional lines for logging
sirtoby
October 21, 2025, 2:37pm
11
@arvidjaar
The cron.hourly was now executed with the file without . and extension.
I will wait now the daily and check again the weekly.
But for the moment it looks like the run-parts did the magic…
Thank you!
ecsos
October 21, 2025, 3:58pm
12
1 Like
sirtoby
October 22, 2025, 9:43am
13
@arvidjaar
the daily was executed as well.
So I guess the weekly will work as well.
Thank you for your support!
ecsos
October 22, 2025, 12:40pm
14
Hmm.
Why should test and debug in crontab?
Use “man run-parts”.