On 09/04/2020 07:00, Francis.Montagnac@xxxxxxxx wrote:
Hi
On Tue, 07 Apr 2020 07:07:36 +0100 Terry Barnaby wrote:
# Min Hour Day Month WeekDay
# Perform incremental backup to every work day
01 23 * * 1 root /src/bbackup/bbackup-beam
01 23 * * 2 root /src/bbackup/bbackup-beam
01 23 * * 3 root /src/bbackup/bbackup-beam
01 23 * * 4 root /src/bbackup/bbackup-beam
01 23 * * 5 root /src/bbackup/bbackup-beam
This system has been in use for 10 years or more on various Fedora
versions. However about 18 months ago I have seen a problem where cron
will start two backups with identical start times occasionally.
I have seen that also a few time, but years ago.
I have had to add a file lock system in the bbackup-beam to cope with this.
I did the same, also for frequent cron jobs that may be stuck for a
too long time, for example if a network outage occurs.
Then (years later) an alternative to cron appeared: systemd.timer.
Pros:
- Gratuitous execution locking
"systemctl start X" is a noop if X runs.
- Ease log management
By default in the system log.
No more need to redirect stdout and stderr to /dev/null as seen
in so many crontabs
- Ease tracking processes
With "systemctl status" "systemctl stop" ...
Cons:
- It's systemd-ish :-)
I can show you how to convert your crontab to systemd.{service,timer}
if you want.
Many thanks. I do use systemd for some things, especially daemon
management, but this is an old (was reliable) system and it is also used
on some much older systems. The cron config is very simple,
understandable and its configuration files are not lost in systemd's
noise. I think I will keep with cron (while it is still available!) for
now. As stated it is functions with the lock, I was just feeding back
the issue in-case there is actually a problem in the system here.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx