Anacron - Have I set this up right?

Trying to get my laptop and also my PC to create an ISO file every Sunday so I can burn straight to DVD for backups.

However I realise becasue they both aren’t on all the time, I cant use cron as if it misses a Sunday, it wont run that sunday so with a bit of googling I found I need to run anacron.

However, I cant find if anacron runs on startup. I believe it does on Ubuntu but I’m not 100% sure.

Secondly, to add the task I have to add it to /etc/anacrontab which I believe would end up looking like this:

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# These replace cron's entries
1       5       cron.daily       nice run-parts --report /etc/cron.daily
7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
@monthly        15      cron.monthly nice run-parts --report /etc/cron.monthly

# My Backup Commands
7       10       Backup-Docs /home/chris/ShellScripts/CreateDocsISOFile.sh

where CreateDocsISOFile is this script:-

#!/bin/bash

cd /home/chris/
mkisofs -v -o DocsBackup.iso /home/chris/Documents

Am I correct in my thinking?

EDIT:

Using the command

sudo anacron Docs-Backup

seems to have worked - however how can I check that anacron starts on boot?

Using a terminal window with root privileges [b]

chkconfig --level 12345 anacron on[/b]

should do it, I believe anacron is a service install?

[QUOTE=Mojo;434439]Using a terminal window with root privileges [b]

chkconfig --level 12345 anacron on[/b]

should do it, I believe anacron is a service install?[/QUOTE]

It is and appears to be working fine thanks :slight_smile:

Checked under Systems > Administration > Services and it’s all ticked and on.
BTW, that command on Ubuntu returns a chkconfig command not recognised but I assume it check the service and see if it runs at the various run levels?

Would that be because terminal in ubuntu doesnt have root ? would you not need sudo at the start ?

sudo chkconfig --level 12345 anacron on

or something like that ?

[QUOTE=placidsheep;434460]Would that be because terminal in ubuntu doesnt have root ? would you not need sudo at the start ?

sudo chkconfig --level 12345 anacron on

or something like that ?[/QUOTE]

I did that :wink: