anacron

periodic command scheduler

WWW CVSWeb GITHub
  1. Package version
    anacron-2.5.3p4
  2. Maintainer
    Andreas Kusalananda Kahari

What it is:
Anacron is a periodic command scheduler. It executes
commands at intervals specified in days. Unlike cron, it
does not assume that the system is running continuously.
It can therefore be used to control the execution of
daily, weekly and monthly jobs (or anything with a period
of n days), on systems that don't run 24 hours a day.
When installed and configured properly, Anacron will make
sure that the commands are run at the specified intervals
as closely as machine-uptime permits.

What it is not:
Anacron is not an attempt to make cron redundant. It cannot
be used to schedule commands at intervals smaller than
days. It also does not guarantee that the commands will be
executed at any specific day or hour. It isn't a full-time
daemon. It has to be executed from boot scripts, from
cron-jobs, or explicitly.

+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------

To start using anacron:

Create the file ${SYSCONFDIR}/anacrontab (see anacrontab(5) for
information about its format).

The following is a simple example which runs the standard
OpenBSD daily, weekly, and monthly scripts:

-----Cut
# ${SYSCONFDIR}/anacrontab example
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HOME=/var/log
# format: period delay job-identifier command
1 5 cron.daily /bin/sh /etc/daily
7 10 cron.weekly /bin/sh /etc/weekly
30 15 cron.monthly /bin/sh /etc/monthly
-----Cut

Comment out the invocation of the corresponding jobs in root's crontab.
If your machine is left running for more than 24h at a time, you
might also want to invoke anacron from an early morning cron job.

To run anacron(8) at boot time, add the following to root's crontab(5):
@reboot ${PREFIX}/sbin/anacron -ds

  • devel/gmake