4.17. Cron

4.17.1. Vixie cron and Cronie

Red Hat Enterprise Linux 6 includes the cronie package as a replacement for vixie-cron. The main difference between these packages is how the regular jobs (daily, weekly, monthly) are done. Cronie uses the /etc/anacrontab file, which by default looks like the following:
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45

# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22

# 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
These regular jobs will be executed once a day in the 03:00-22:00 time interval, including a random delay. For example, cron.daily will have a 5 minute forced delay plus a random delay of 0-45 minutes. You could also run jobs with no delays, between 4 and 5:
RANDOM_DELAY=0 # or do not use this option at all

START_HOURS_RANGE=4-5

# period in days   delay in minutes   job-identifier   			command
1			0		cron.daily	nice run-parts	/etc/cron.daily
7			0		cron.weekly	nice run-parts	/etc/cron.weekly
@monthly		0		cron.monthly	nice run-parts	/etc/cron.monthly
Features of cronie include:
  • Random delay for starting the job in /etc/anacrontab.
  • Time range of regular jobs can be defined in /etc/anacrontab.
  • Each cron table can have its own defined time zone with the CRON_TZ variable.
  • By default, the cron daemon checks for changes in tables with inotify.
For further details about cronie and cronie-anacron, see the Red Hat Enterprise Linux Deployment Guide.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.