[opensuse] When are those cron.hourly and other folders exactly being scheduled?
Hi there, I am trying to find out when (minute, hour, etc.) are those cron.hourly, cron.daily and such folders being executed exactly and where this is defined? Haven't looked really too much at cron or crontab in the past, but I think lot of this stuff used to be directly in crontab and its syntax there. But recent openSuSE releases have kind of relayed or are indrectly calling these cron jobs. My goal is: to run a script during working hours on work days every two hours for example starting from 10:00am til 18:00pm, and some single script at the end of the day say 22:00pm every work day. Running leap 42.2 Thank you. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Feb 15, 2017 at 10:48 AM, cagsm
I am trying to find out when (minute, hour, etc.) are those cron.hourly, cron.daily and such folders being executed exactly and where this is defined? Haven't looked really too much at cron or crontab in the past, but I think lot of this stuff used to be directly in crontab and its syntax there. But recent openSuSE releases have kind of relayed or are indrectly calling these cron jobs.
Meanwhile I have found some article at: https://www.suse.com/communities/blog/why-are-my-cron-jobs-not-running-when-... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
cagsm wrote:
Hi there,
I am trying to find out when (minute, hour, etc.) are those cron.hourly, cron.daily and such folders being executed exactly and where this is defined?
I never rely on those, but ISTR they're not exactly scheduled at any particular time. There is some sort of whacky (IMO) timing scheme. However, I have not looked at it for so long, things could well have changed. I would assume some systemd timer at least.
Haven't looked really too much at cron or crontab in the past, but I think lot of this stuff used to be directly in crontab and its syntax there. But recent openSuSE releases have kind of relayed or are indrectly calling these cron jobs.
I think it's been kept in cron.{hourly,daily,weekly,monthly} for years. At least since 10.3.
My goal is: to run a script during working hours on work days every two hours for example starting from 10:00am til 18:00pm, and some single script at the end of the day say 22:00pm every work day.
in /etc/cron.d/something: 0 10,12,14,16,18 * * Mon-Fri user whatever-you-want 0 22 * * Mon-Fri user single-script in your own crontab, you omit 'user'. -- Per Jessen, Zürich (4.9°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 2017-02-15 a las 10:48 +0100, cagsm escribió:
Hi there,
I am trying to find out when (minute, hour, etc.) are those cron.hourly, cron.daily and such folders being executed exactly and where this is defined?
No, there is no fixed time. The minute is one of 15, 30, 45, 00. You can choose a preferred hour (interval), but if the machine is not running at that hour for several days, after a (configurable) number of days it will run at the first chance (ie, the first occurrence of a minute on the quarter).
Haven't looked really too much at cron or crontab in the past, but I think lot of this stuff used to be directly in crontab and its syntax there.
But recent openSuSE releases have kind of relayed or are indrectly calling these cron jobs.
No. The jobs in those directories are handled from a script that runs from /etc/crontab, as always. However, other jobs may be run by systemd timers, so they are *not* cron jobs.
My goal is: to run a script during working hours on work days every two hours for example starting from 10:00am til 18:00pm, and some single script at the end of the day say 22:00pm every work day.
Then simply define your job with the appropiate cron entry(s), same method for decades of unix and linux. Ignore the hour, day, week, month directories. - -- Cheers Carlos E. R. (from 42.2 x86_64 "Malachite" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAlikXZsACgkQja8UbcUWM1xN6QEAihWqBKwGXuZ4V4ETY8h4Tq+X vZDusV7Tk8YOcTQcZGABAJKO7E+uDEqxFR65NJNRsK8RItAMDM0NvjlPw4mINqex =RiOE -----END PGP SIGNATURE-----
participants (3)
-
cagsm
-
Carlos E. R.
-
Per Jessen