---
name: anacron
version: 2.3_4
origin: sysutils/anacron
comment: Schedules periodic jobs on systems that are not permanently up
arch: freebsd:9:x86:64
www: http://sourceforge.net/projects/anacron
maintainer: dz@426.ch
prefix: /usr/local
licenselogic: single
flatsize: 28351
desc: |
  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.

  Anacron is not an attempt to make cron redundant.

  Requirements
   - A functioning syslog daemon.
   - A functioning /usr/sbin/sendmail command.  (all MTAs should have that).

  WWW: http://sourceforge.net/projects/anacron
categories: [sysutils]
files:
  /usr/local/etc/anacrontab.default: a664443c160869b622923c51b02f9b447d26f4173a4c244b1a12c5b1f3fd0431
  /usr/local/etc/rc.d/anacron: a0c63deda71d73ad1af87de63105538351898e98821ac976df9aa5615e26326e
  /usr/local/man/man5/anacrontab.5.gz: bf6bc0a4f24017b5e90e51cd12a8dcc90f0c8335bb4482772eaaa366d59f01ca
  /usr/local/man/man8/anacron.8.gz: b697db11f5a8334fa24c76ae2c4b16b0e7fd9b560c95e13fab0ce985f10001f7
  /usr/local/sbin/anacron: ce010b5bb59ec9abfe543f984c4c88abb2f33c68094415a3366613ba9e74ae72
directories:
  /var/spool/anacron/: y
scripts:
  post-install: |
    [ -f /usr/local/etc/anacrontab ] || cp /usr/local/etc/anacrontab.default /usr/local/etc/anacrontab
    mkdir -p /var/spool/anacron
    cd /usr/local
  pre-deinstall: |
    if cmp -s /usr/local/etc/anacrontab.default /usr/local/etc/anacrontab; then rm -f /usr/local/etc/anacrontab; fi
    cd /usr/local
  post-deinstall: |
    cd /usr/local
message: |2+

  Configuration hints:
  - Edit /usr/local/etc/anacrontab
  - Deactivate the 'periodic' commands in /etc/crontab
  - Add a call to anacron to /etc/crontab, like
    0  0  *  *  *    root    /usr/local/sbin/anacron
  - Add anacron_enable="YES" to /etc/rc.conf
  - Read anacron(8) and anacrontab(5)

