Hallo,
im working with suse 9.1 and I have organized my backups with cron. As the PC is not running 24/7 I would like to use anacron to catch up the missing jobs.
When I start anacron manually with
Code:
/usr/sbin/anacron -t /etc/anacrontab
the var/log/messages shows:
Code:
Apr 30 15:42:53 dhcppc0 anacron[8932]: Anacron 2.3 started on 2005-04-30
Apr 30 15:42:53 dhcppc0 anacron[8932]: Will run job `cron.daily' in 5 min.
Apr 30 15:42:53 dhcppc0 anacron[8932]: Will run job `cron.weekly' in 10 min.
Apr 30 15:42:53 dhcppc0 anacron[8932]: Will run job `cron.monthly' in 15 min.
But the scripts in cron.daily, cron.weekly and cron.monthly are not getting started, not even when
I remove the timestamps in /var/spool/anacron and the timestamps cron is using in /var/spool/cron/lastrun as well. No effect what so ever.
My crontab:
Code:
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
-*/3 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
47 12 * * * root rm -f /var/spool/cron/lastrun/cron.daily
30 17 * * 5 root rm -f /var/spool/cron/lastrun/cron.weekly
00 18 29 4 * root rm -f /var/spool/cron/lastrun/cron.monthly
My anacrontab:
Code:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
1 5 cron.daily /etc/cron.daily
3 10 cron.weekly /etc/cron.weekly
27 15 cron.monthly /etc/cron.monthly
Has anybody an idea how to trigger the scripts with anacron. And another thing I am struggling with is, how to get anacron started at boot time as root. I have noticed that some distributions offer to start anacron by using the runlevel editor, but SuSE doesen't.
With best regards and thanks in advanced
Juergen