You are not logged in.

Anacron is a sheduler that is useful for system which are not continuously running (ex. laptops).  Add anacrond in the DAEMONS list in rc.conf.  The anacrontab file is set-up to run the crond jobs. Any comments would be appreciated.  
PKGBUILD
pkgname=anacron
pkgver=2.3
pkgrel=1
pkgdesc="A cron-like periodic command scheduler"
url="http://sourceforge.net/projects/anacron"
license="GPL"
depends=('glibc' 'dcron')
makedepends=('sed')
source=(http://dl.sourceforge.net/sourceforge/anacron/$pkgname-$pkgver.tar.gz anacrond anacrontab)
md5sums=('865cc1dfe1ed75c470d3e6de13763f03' 'b2b69770432de46233f41ae284af2c0d'
         '058c281825c668c569a010b21da8e444')
build() {
  cd $startdir/src/$pkgname-$pkgver
  DIR=$startdir/src/$pkgname-$pkgver
  sed -e "s/const int isleap;/int isleap;/" < $DIR/gregor.c > $DIR/gregor.c.tmp
  mv $DIR/gregor.c.tmp $DIR/gregor.c
  sed -e "s=PREFIX = =PREFIX = $startdir/pkg=" < $DIR/Makefile > $DIR/Makefile.tmp
  mv $DIR/Makefile.tmp $DIR/Makefile
  make || return 1
  make prefix=$startdir/pkg/usr install
  mkdir -p $startdir/pkg/etc/rc.d
  cp $startdir/anacrond $startdir/pkg/etc/rc.d/
  cp $startdir/anacrontab $startdir/pkg/etc
}anacrond
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
  start)
    stat_busy "Starting Anacron Daemon"
    /usr/sbin/anacron -d >> /var/log/anacrond 2>&1
    if [ $? -gt 0 ]; then
      stat_fail
    else
    stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping Anacron Daemon"
    stat_done
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0anacrontab
# /etc/anacrontab
SHELL=/bin/bash
# format: period delay job-identifier command
1        5      cron.daily      run-cron /etc/cron.daily
7       10      cron.weekly     run-cron /etc/cron.weekly
30      15      cron.monthly    run-cron /etc/cron.monthlyOffline

There is a "bug" in the anacrontab file.   The delays were really slowing the boot time. No delay would be better for the deamon.
  The delays were really slowing the boot time. No delay would be better for the deamon.  
The new anacrontab:
# /etc/anacrontab
SHELL=/bin/bash
# format: period delay job-identifier command
1        0      cron.daily      run-cron /etc/cron.daily
7       0      cron.weekly     run-cron /etc/cron.weekly
30     0      cron.monthly    run-cron /etc/cron.monthly Offline
The delays were really slowing the boot time. No delay would be better for the deamon.
Why you not use
/usr/sbin/anacron -s
in the /etc/rc.d/anacrond file ?
regards
albert
Offline