Hello,
Thank for all the comments.
The issue is with weekly cron
On Saturday, /etc/cron.weekly/backup.cron is run twice
Here is /etc/anacrontab
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly
and here /etc/crontab
22 23 * * * root run-parts /etc/cron.daily
30 12 * * 6 root run-parts /etc/cron.weekly
I understand that if I set
dotlockfile -l
at the beginning of my /etc/cron.weekly/backup.cron
and
dotlockfile -u
at the end of the same file
I must avoid to run
/etc/cron.weekly/backup.cron
at the same time, but it does not prevent to run
/etc/cron.weekly/backup.cron twice (sequentially) in the same day (like today).
===========================================================================
Patrick DUPRÉ | | email: pdupre(a)gmx.com
Laboratoire interdisciplinaire Carnot de Bourgogne
9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
Tel: +33 (0)380395988 | | Room# D114A
===========================================================================
> Sent: Saturday, December 11, 2021 at 5:08 PM
> From: "Jonathan Billings" <billings(a)negate.org>
> To: "Community support for Fedora users"
<users(a)lists.fedoraproject.org>
> Subject: Re: crond/anacron
>
>
>
> > On Dec 11, 2021, at 10:38, Jonathan Billings <billings(a)negate.org> wrote:
> >
> > The thing is, Anacron only runs if you boot after the scheduled job is supposed
to run out of cron. It shouldn’t run twice. So maybe you have your backups scheduled in
more than one place?
>
> I should be extra clear here - Anacron is what runs the cron.daily (and weekly,
monthly) jobs. They just will also run shortly after boot on the hour if you boot later
in the day. Disabling Anacron will break the cron.daily, cron.weekly, cron.monthly jobs.
>
> So there’s no way they’d run twice unless you have it in more than one scheduling
service/location.
>
> —
> Jonathan Billings
> _______________________________________________
> users mailing list -- users(a)lists.fedoraproject.org
> To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
> 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@lists.fedoraproject.org
> Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure
>