Re: [gentoo-user] cron tab

2017-03-22 Thread Daniel Frey
On 03/21/2017 10:10 PM, the...@sys-concept.com wrote:
> On 03/21/2017 10:49 PM, Michael Orlitzky wrote:
>> On 03/22/2017 12:48 AM, Michael Orlitzky wrote:
>>>
>>> Vixie cron (as well as cronie with USE=anacron) should run the job at
>>> the correct time.
>>>
>>
>> blarg, cronie with USE="-anacron", the anacron flag needs to be OFF.
> 
> I have: 
> sys-process/vixie-cron-4.1-r14 (pam -debug -selinux)
> 
> I created a cron job as root:
> 6 18 3 * 1-5 rsync -av /usr/src/linux/.config 
> /home/thelma/backup/etc/etc_atom/kenel-config
> 
> and checking the /var/log/messages it run at 18:06 today (Mar.21) ?
> but it should run every month on the 3rd. only at 18:06
> 
> grep cron /var/log/messages
> ...
> Mar 21 18:06:01 localhost cron[5190]: (root) CMD (rsync -av 
> /usr/src/linux/.config /home/thelma/backup/etc/etc_atom/kenel-config)
> 
> All my system that I upgraded are effected this way :-/
> 
> --
> Thelma
> 

You've told it to run on the third of the month *and* Mon-Fri. It's just
doing what you told it to.

Dan



Re: [gentoo-user] cron tab

2017-03-22 Thread thelma
On 03/22/2017 12:46 AM, Alan McKinnon wrote:
> On 22/03/2017 02:27, the...@sys-concept.com wrote:
>> I have a cron tab entry:
>> 5 18 3 * 1-5
>>
>> To my understanding it will run 18:05 on the 3rd day of the month, from
>> Mon-Fri.
>>
>> So why did this cron entry run today?
>>
> 
> You have not read the man page.
> 
> Fields 3 & 4 plus 5 are not anded like you are assuming. It is more
> 
> (3 AND 4) OR 5 giving you this:
> Run at 18:05 on the 3rd,
> and also
> Run at 18:05 every Mon-Fri
> 
> and it's all in the man page, and you are having an alarming tendency to
> not read them. Please deal with this internal lack.

Yes, you are correct; I have to work on it.

> 
> Now this all makes sense. You cannot possibly have the 3rd day of the
> month happen Monday to Friday

You are correct it should be:
5 18 3 * *

--
Thelma




Re: [gentoo-user] cron tab

2017-03-22 Thread Gerrit Kühn
On Tue, 21 Mar 2017 21:13:09 -0600 the...@sys-concept.com wrote about Re:
[gentoo-user] cron tab:

> https://crontab.guru/#5_18_3_*_1-5
> 
> ?At 18:05 on day-of-month 3 and on every day-of-week from Monday through
> Friday.?
> 
> So it shouldn't run today!

But it should. It runs "at 18:05 on day-of-month 3 *and* on every
day-of-week from Monday through Friday". This is not a "logical" and, it
is a "lingual" one. "Today" is Tuesday in your case, which belongs into
"Monday through Friday".


cu
  Gerrit



Re: [gentoo-user] cron tab

2017-03-22 Thread Alan McKinnon

On 22/03/2017 02:27, the...@sys-concept.com wrote:

I have a cron tab entry:
5 18 3 * 1-5

To my understanding it will run 18:05 on the 3rd day of the month, from
Mon-Fri.

So why did this cron entry run today?



You have not read the man page.

Fields 3 & 4 plus 5 are not anded like you are assuming. It is more

(3 AND 4) OR 5 giving you this:
Run at 18:05 on the 3rd,
and also
Run at 18:05 every Mon-Fri

and it's all in the man page, and you are having an alarming tendency to 
not read them. Please deal with this internal lack.


Now this all makes sense. You cannot possibly have the 3rd day of the 
month happen Monday to Friday




--
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] cron tab

2017-03-21 Thread thelma
On 03/21/2017 10:49 PM, Michael Orlitzky wrote:
> On 03/22/2017 12:48 AM, Michael Orlitzky wrote:
>>
>> Vixie cron (as well as cronie with USE=anacron) should run the job at
>> the correct time.
>>
> 
> blarg, cronie with USE="-anacron", the anacron flag needs to be OFF.

I have: 
sys-process/vixie-cron-4.1-r14 (pam -debug -selinux)

I created a cron job as root:
6 18 3 * 1-5 rsync -av /usr/src/linux/.config 
/home/thelma/backup/etc/etc_atom/kenel-config

and checking the /var/log/messages it run at 18:06 today (Mar.21) ?
but it should run every month on the 3rd. only at 18:06

grep cron /var/log/messages
...
Mar 21 18:06:01 localhost cron[5190]: (root) CMD (rsync -av 
/usr/src/linux/.config /home/thelma/backup/etc/etc_atom/kenel-config)

All my system that I upgraded are effected this way :-/

--
Thelma



Re: [gentoo-user] cron tab

2017-03-21 Thread Michael Orlitzky

On 03/22/2017 12:48 AM, Michael Orlitzky wrote:


Vixie cron (as well as cronie with USE=anacron) should run the job at
the correct time.



blarg, cronie with USE="-anacron", the anacron flag needs to be OFF.





Re: [gentoo-user] cron tab

2017-03-21 Thread Michael Orlitzky

On 03/22/2017 12:42 AM, the...@sys-concept.com wrote:


You might be correct on my other system I have: sys-process/vixie-cron
and the cron job is running at a wrong time as well.
It just happen after recent upgrade.



Vixie cron (as well as cronie with USE=anacron) should run the job at 
the correct time.


Do you have cron logs that tell you how/when the job was kicked off? 
It's possible that the job took half a month to complete.


Do you use user cron jobs, or only root jobs in /etc/crontab? It's 
possible that some *other* job -- created during e.g. testing -- ran today.





Re: [gentoo-user] cron tab

2017-03-21 Thread thelma
On 03/21/2017 10:00 PM, Michael Orlitzky wrote:
> On 03/21/2017 11:48 PM, the...@sys-concept.com wrote:
>>>
>>> Which cron program are you using? For example, anacron and fcron will
>>> attempt to run "missed" jobs.
>>
>> System time is correct.
>>
>>
>> I'm running: sys-process/cronie sys-process/cronbase
>>
>> I'll try to switch to sys-process/vixie-cron
>>
> 
> Don't bother, cronie is a fork of vixie-cron. So long as you *do not*
> have USE=anacron set on sys-process/cronie, you should be good.

You might be correct on my other system I have: sys-process/vixie-cron
and the cron job is running at a wrong time as well.
It just happen after recent upgrade.

(no wonder I hate upgrades, or the amount of time I have to spend to fix
it).
--
Thelma



Re: [gentoo-user] cron tab

2017-03-21 Thread Michael Orlitzky

On 03/21/2017 11:48 PM, the...@sys-concept.com wrote:


Which cron program are you using? For example, anacron and fcron will
attempt to run "missed" jobs.


System time is correct.


I'm running: sys-process/cronie sys-process/cronbase

I'll try to switch to sys-process/vixie-cron



Don't bother, cronie is a fork of vixie-cron. So long as you *do not* 
have USE=anacron set on sys-process/cronie, you should be good.





Re: [gentoo-user] cron tab

2017-03-21 Thread thelma
On 03/21/2017 09:26 PM, Michael Orlitzky wrote:
> On 03/21/2017 11:13 PM, the...@sys-concept.com wrote:
>>
>> https://crontab.guru/#5_18_3_*_1-5
>>
>> “At 18:05 on day-of-month 3 and on every day-of-week from Monday through
>> Friday.”
>>
>> So it shouldn't run today!
>>
> 
> Which cron program are you using? For example, anacron and fcron will
> attempt to run "missed" jobs.

System time is correct.


I'm running: sys-process/cronie sys-process/cronbase

I'll try to switch to sys-process/vixie-cron

--
Thelma



Re: [gentoo-user] cron tab

2017-03-21 Thread Michael Orlitzky

On 03/21/2017 11:13 PM, the...@sys-concept.com wrote:


https://crontab.guru/#5_18_3_*_1-5

“At 18:05 on day-of-month 3 and on every day-of-week from Monday through
Friday.”

So it shouldn't run today!



Which cron program are you using? For example, anacron and fcron will 
attempt to run "missed" jobs.





Re: [gentoo-user] cron tab

2017-03-21 Thread tuxic
On 03/21 09:13, the...@sys-concept.com wrote:
> 
> On 03/21/2017 06:53 PM, Jigme Datse Yli-RAsku wrote:
> > If I remember, it runs on the 1st to 5th day of the week, and the third day 
> > of the month.  But I'd have to look to be sure.
> > 
> > On 2017-03-21 17:27, the...@sys-concept.com wrote:
> >> I have a cron tab entry:
> >> 5 18 3 * 1-5
> >>
> >> To my understanding it will run 18:05 on the 3rd day of the month, from
> >> Mon-Fri.
> >>
> >> So why did this cron entry run today?
> 
> https://crontab.guru/#5_18_3_*_1-5
> 
> ???At 18:05 on day-of-month 3 and on every day-of-week from Monday through
> Friday.???
> 
> So it shouldn't run today!
> 
> --
> Thelma
> 

Hi,

...is your system time off ?
:)

Cheers
Meino




Re: [gentoo-user] cron tab

2017-03-21 Thread thelma

On 03/21/2017 06:53 PM, Jigme Datse Yli-RAsku wrote:
> If I remember, it runs on the 1st to 5th day of the week, and the third day 
> of the month.  But I'd have to look to be sure.
> 
> On 2017-03-21 17:27, the...@sys-concept.com wrote:
>> I have a cron tab entry:
>> 5 18 3 * 1-5
>>
>> To my understanding it will run 18:05 on the 3rd day of the month, from
>> Mon-Fri.
>>
>> So why did this cron entry run today?

https://crontab.guru/#5_18_3_*_1-5

“At 18:05 on day-of-month 3 and on every day-of-week from Monday through
Friday.”

So it shouldn't run today!

--
Thelma



Re: [gentoo-user] cron tab

2017-03-21 Thread Jigme Datse Yli-RAsku
If I remember, it runs on the 1st to 5th day of the week, and the third day of 
the month.  But I'd have to look to be sure.

On 2017-03-21 17:27, the...@sys-concept.com wrote:
> I have a cron tab entry:
> 5 18 3 * 1-5
>
> To my understanding it will run 18:05 on the 3rd day of the month, from
> Mon-Fri.
>
> So why did this cron entry run today?
>

-- 
Jigme Datse Yli-Rasku
jigme.da...@datsemultimedia.com (Preferred address for new messages)
250-505-6117

Jigme Datse Yli-Rasku
PO Box 270
Rossland, BC V0G 1Y0
Canada

...
... This message should be electronically signed, and if the sender ...
... has your public key, may also be encrypted. ...
... If you have any questions about this, please email, or call. ...
... ...
... Note, unknown calls likely will go to voicemail. ...
... Please leave a message if you get voicemail. ...
...