The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,873 other followers

Archive for the ‘cron’ Category

OpenSuSE: location of cron jobs

Posted by jpluimers on 2020/01/20

When you look at how to find listed cron jobs, usually the answer is cron -l or cron -u username -l.

However, on OpenSuSE systems, cron jobs can be in different places, and the sysconfig settings have influence on them too.

These files and directories all influence cron:

Directories:

/etc/cron.d/
/etc/cron.daily/
/etc/cron.hourly/
/etc/cron.monthly/
/etc/cron.weekly/

Files:

/etc/sysconfig/cron
/etc/init.d/rc2.d/K01cron
/etc/init.d/rc2.d/S14cron
/etc/init.d/rc3.d/K01cron
/etc/init.d/rc3.d/S14cron
/etc/init.d/rc5.d/K01cron
/etc/init.d/rc5.d/S14cron
/etc/init.d/cron
/etc/news/crontab.sample
/etc/pam.d/crond
/etc/systemd/system/multi-user.target.wants/cron.service
/etc/omc/srvinfo.d/cron.xml
/etc/cron.deny
/etc/crontab

Most are available for other Linux distributions as well, but each one might have slightly different configurations (especially for the directories). Some background reading:

Some details:

  • The crontab -l will only list what is in /etc/crontab.
  • These directories are influenced by/etc/sysconfig/cron, especially the DAILY_TIME variable (see below) for the daily jobs.
    All of the directories are checked every 15 minutes through /usr/lib/cron/run-crons:/etc/cron.daily/
    /etc/cron.hourly/
    /etc/cron.monthly/
    /etc/cron.weekly/
  • That script then uses these files for checking when to run:/var/spool/cron/lastrun/cron.weekly
    /var/spool/cron/lastrun/cron.daily
    /var/spool/cron/lastrun/cron.hourly

The DAILY_TIME variable:

## Type: string
## Default: ""
#
# At which time cron.daily should start. Default is 15 minutes after booting
# the system. Example setting would be "14:00".
# Due to the fact that cron script runs only every 15 minutes,
# it will only run on xx:00, xx:15, xx:30, xx:45, not at the accurate time
# you set.
DAILY_TIME=""

–jeroen

 

Posted in *nix, *nix-tools, cron, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Scheduled jobs and jitter…

Posted by jpluimers on 2019/05/23

Too bad G+ doesn’t allow the WayBack machine or Archive.is to archive the whole thread at [WayBack] [Archive.isDas es inzwischen fast überall Standard ist die Uhren mit einem guten Zeitsignal zu synchronisiseren (NTP, DCF-77, GPS etc) ist eigentlich eine gute Sache… – Kristian Köhntopp – Google+ so here are a few quotes below.

The generatel conclusions seem to be that:

This was the start:
Nils Ketelsen originally shared:

Guckt man live sieht es schon anders aus: Während die RunQueue meist so bei 4-5 liegt (bei 21vCPUs kein Problem) springt sie jede volle Minute einige Sekunden lang auf 20. Bei durch 2 Teilbaren Minuten auf ca. 40. Bei durch 10 Teilbaren Minuten auf 70, bei durch 15 teilbaren Minuten auf 150…. Ich habe eben durch einen schlecht getimten Toilettenbesuch die volle Stunde verpasst, das muss ich gleich mal anders hinbekommen, aber ich gehe davon aus, daß es da noch schlimmer ist.

And these some of the comments:

Read the rest of this entry »

Posted in *nix, *nix-tools, Algorithms, cron, Development, Power User, Software Development | Leave a Comment »

crontab.guru – the cron schedule expression editor

Posted by jpluimers on 2019/04/12

Confused by crontab expressions? Me too, so I was happy to find: At minute 3 past every 12th hourcrontab.guru – the cron schedule expression editor.

It has a [WayBack] truckload of common crontab expressions, but more importantly allows you to live edit one, then explains in human terms what it means and when the schedule runs next.

If you like a step by step cron configurator, then you can try [WayBackCron Job Generator by GenerateIt.net but need to note it cannot interpret a cron expression.

–jeroen

Posted in *nix, *nix-tools, cron, Linux, Power User | Leave a Comment »

 
%d bloggers like this: