Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-09 Thread Terry Barnaby
On 09/04/2020 12:24, Ed Greshko wrote: On 2020-04-09 17:57, Terry Barnaby wrote: The script already has date/time and the log shows (The Wed 8th entries entry  having the PID): Bbackup / /usr/beam /home /src /srcOld /dist /opt /scratch /data/svn /data/www /data/vwt /data/www /data1/kvm /data/d

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-09 Thread Ed Greshko
On 2020-04-09 17:57, Terry Barnaby wrote: > The script already has date/time and the log shows (The Wed 8th entries entry  > having the PID): > > Bbackup / /usr/beam /home /src /srcOld /dist /opt /scratch /data/svn > /data/www /data/vwt /data/www /data1/kvm /data/database /data/vwt > /data/backup

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-09 Thread Terry Barnaby
On 09/04/2020 07:00, francis.montag...@inria.fr 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 /

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-09 Thread Terry Barnaby
On 08/04/2020 23:11, Cameron Simpson wrote: On 08Apr2020 14:54, Terry Barnaby wrote: Note this has happened a few times this year, (approx 1 in 64 x) so not related to DST changes anyway. Might be due to chrony clock resyncs I suppose but I think something stranger is going on here or somethi

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Francis . Montagnac
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 /s

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Cameron Simpson
On 08Apr2020 14:54, Terry Barnaby wrote: Note this has happened a few times this year, (approx 1 in 64 x) so not related to DST changes anyway. Might be due to chrony clock resyncs I suppose but I think something stranger is going on here or something silly and obvious in what I am doing. I

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Cameron Simpson
On 08Apr2020 07:52, Ed Greshko wrote: On 2020-04-08 07:27, Cameron Simpson wrote: On 07Apr2020 07:07, Terry Barnaby wrote: 01 23 * * 1 root /src/bbackup/bbackup-beam [...] 1:23am. Do not the timezone shifts happen at 2am (avoids horrible day changes if it happened at 12am). So 1:23am can h

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Joe Zeff
On 04/08/2020 06:21 AM, Patrick O'Callaghan wrote: I don't know how it works where you live, but in the UK the autumn switch occurs at 2am, which reverts back to being 1am. Thus a time such as 1:30am occurs twice, and events programmed for that time can be triggered twice. It's the same in the

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Ed Greshko
On 2020-04-08 21:37, Patrick O'Callaghan wrote: > On Wed, 2020-04-08 at 20:28 +0800, Ed Greshko wrote: >>> I don't know how it works where you live, but in the UK the autumn >>> switch occurs at 2am, which reverts back to being 1am. Thus a time such >>> as 1:30am occurs twice, and events programmed

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Terry Barnaby
On 08/04/2020 14:37, Patrick O'Callaghan wrote: On Wed, 2020-04-08 at 20:28 +0800, Ed Greshko wrote: I don't know how it works where you live, but in the UK the autumn switch occurs at 2am, which reverts back to being 1am. Thus a time such as 1:30am occurs twice, and events programmed for that t

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Patrick O'Callaghan
On Wed, 2020-04-08 at 20:28 +0800, Ed Greshko wrote: > > I don't know how it works where you live, but in the UK the autumn > > switch occurs at 2am, which reverts back to being 1am. Thus a time such > > as 1:30am occurs twice, and events programmed for that time can be > > triggered twice. > > >

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Ed Greshko
On 2020-04-08 20:21, Patrick O'Callaghan wrote: > On Wed, 2020-04-08 at 17:06 +0800, Ed Greshko wrote: >> On 2020-04-08 16:56, Patrick O'Callaghan wrote: >>> On Wed, 2020-04-08 at 07:52 +0800, Ed Greshko wrote: On 2020-04-08 07:27, Cameron Simpson wrote: > On 07Apr2020 07:07, Terry Barnaby

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Patrick O'Callaghan
On Wed, 2020-04-08 at 20:11 +0800, Ed Greshko wrote: >If time was adjusted one hour forward, those jobs that would have run > in >the interval that has been skipped will be run immediately. > Conversely, >if time was adjusted backward, running the same job twice is avoide

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Patrick O'Callaghan
On Wed, 2020-04-08 at 17:06 +0800, Ed Greshko wrote: > On 2020-04-08 16:56, Patrick O'Callaghan wrote: > > On Wed, 2020-04-08 at 07:52 +0800, Ed Greshko wrote: > > > On 2020-04-08 07:27, Cameron Simpson wrote: > > > > On 07Apr2020 07:07, Terry Barnaby wrote: > > > > > 01 23 * * 1 root /src/bbackup

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Ed Greshko
On 2020-04-08 20:01, Andy Paterson via users wrote: > I understood crontab used UTC time - daylight saving shouldn't apply > Not unless you set the CRON_TZ variable.  Also, if that were the case then the man page wouldn't need to tell you    Daylight Saving Time and other time changes   

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Andy Paterson via users
I understood crontab used UTC time - daylight saving shouldn't apply > On 8 Apr 2020, at 10:07, Ed Greshko wrote: > > On 2020-04-08 16:56, Patrick O'Callaghan wrote: >>> On Wed, 2020-04-08 at 07:52 +0800, Ed Greshko wrote: >>> On 2020-04-08 07:27, Cameron Simpson wrote: On 07Apr2020 07:07,

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Ed Greshko
On 2020-04-08 16:56, Patrick O'Callaghan wrote: > On Wed, 2020-04-08 at 07:52 +0800, Ed Greshko wrote: >> On 2020-04-08 07:27, Cameron Simpson wrote: >>> On 07Apr2020 07:07, Terry Barnaby wrote: 01 23 * * 1 root /src/bbackup/bbackup-beam >>> [...] >>> >>> 1:23am. Do not the timezone shifts ha

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-08 Thread Patrick O'Callaghan
On Wed, 2020-04-08 at 07:52 +0800, Ed Greshko wrote: > On 2020-04-08 07:27, Cameron Simpson wrote: > > On 07Apr2020 07:07, Terry Barnaby wrote: > > > 01 23 * * 1 root /src/bbackup/bbackup-beam > > [...] > > > > 1:23am. Do not the timezone shifts happen at 2am (avoids horrible day > > changes if

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Ed Greshko
On 2020-04-08 07:27, Cameron Simpson wrote: > On 07Apr2020 07:07, Terry Barnaby wrote: >> 01 23 * * 1 root /src/bbackup/bbackup-beam > [...] > > 1:23am. Do not the timezone shifts happen at 2am (avoids horrible day changes > if it happened at 12am). So 1:23am can happen twice if 2am steps back to

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Cameron Simpson
On 07Apr2020 07:07, Terry Barnaby wrote: 01 23 * * 1 root /src/bbackup/bbackup-beam [...] 1:23am. Do not the timezone shifts happen at 2am (avoids horrible day changes if it happened at 12am). So 1:23am can happen twice if 2am steps back to 1am. Our summer time just ended here. Might a sim

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Samuel Sieb
On 4/7/20 3:21 AM, Terry Barnaby wrote: On 07/04/2020 09:03, Samuel Sieb wrote: On 4/6/20 11:07 PM, Terry Barnaby wrote: 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 identic

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Terry Barnaby
On 07/04/2020 13:06, Iosif Fettich wrote: Hi Terry, Yes, there is nothing unusual in /var/log/cron: Apr  6 22:01:01 beam CROND[651585]: (root) CMD (run-parts /etc/cron.hourly) [...] /var/log/messages Feb 24 23:00:03 beam dhcpd[1743]: DHCPREQUEST for 192.168.201.214 from 00:25:b3:e6:a9:18

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Iosif Fettich
Hi Terry, Yes, there is nothing unusual in /var/log/cron: Apr  6 22:01:01 beam CROND[651585]: (root) CMD (run-parts /etc/cron.hourly) [...] /var/log/messages Feb 24 23:00:03 beam dhcpd[1743]: DHCPREQUEST for 192.168.201.214 from 00:25:b3:e6:a9:18 via enp4s0 [...] In the backup log: Bba

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Iosif Fettich
Hi Terry, The bbackup-beam shell script is pretty basic and I can't see how this could have an issue like this. Googling on similar issues finds some hits where the cause were two running cron daemons, e.g. https://stackoverflow.com/questions/1004764/why-is-this-cron-entry-executed-twice I

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Iosif Fettich
Hi Terry, I have assumed the system time is always UTC synchronised using chronyd. The servers user code is running under the GMT timezone. I was wondering if the tweaking of the time by chronyd could cause this issue, but I would have thought this situation would have been handled by crond

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Terry Barnaby
On 07/04/2020 09:03, Samuel Sieb wrote: On 4/6/20 11:07 PM, Terry Barnaby wrote: 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 had

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Terry Barnaby
On 07/04/2020 09:25, Iosif Fettich wrote: Hi, On 2020-04-07 14:07, Terry Barnaby wrote: I have a simple backup system that starts off a backup once per night during the weekdays. There is a crontab file in /etc/cron.d with the following entries: #

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Iosif Fettich
Hi, On 2020-04-07 14:07, Terry Barnaby wrote: I have a simple backup system that starts off a backup once per night during the weekdays. There is a crontab file in /etc/cron.d with the following entries: # Beam B

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Samuel Sieb
On 4/6/20 11:07 PM, Terry Barnaby wrote: 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 had to add a file lock system in the bbackup

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Terry Barnaby
On 07/04/2020 08:21, Ed Greshko wrote: On 2020-04-07 14:07, Terry Barnaby wrote: I have a simple backup system that starts off a backup once per night during the weekdays. There is a crontab file in /etc/cron.d with the following entries: ###

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Tim via users
On Tue, 2020-04-07 at 07:07 +0100, Terry Barnaby wrote: > I have had to add a file lock system in the bbackup-beam to cope with > this. Probably a good thing to do, anyway. -- uname -rsvp Linux 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 Boilerplate: All unexpect

Re: Cron sometimes starts two jobs from the same crontab entry

2020-04-07 Thread Ed Greshko
On 2020-04-07 14:07, Terry Barnaby wrote: > I have a simple backup system that starts off a backup once per night during > the weekdays. There is a crontab file in /etc/cron.d with the following > entries: > > > # Be

Cron sometimes starts two jobs from the same crontab entry

2020-04-06 Thread Terry Barnaby
I have a simple backup system that starts off a backup once per night during the weekdays. There is a crontab file in /etc/cron.d with the following entries: # Beam Bbackup cron setup   Backup to ... ##