cron.daily
Daniel Pittman
daniel at rimspace.net
Tue Jan 9 02:44:47 UTC 2007
Bernhard Breinbauer <infopipe at gmx.net> writes:
> I'm having a problem with a daily cron job. I would like to execute my
> backup script every day, therefore i copied it into /etc/cron.daily: #
> ls -l /etc/cron.daily/my_flexbackup.sh -rwxr-xr-x 1 root root 9704
> 2006-12-11 15:04 /etc/cron.daily/my_flexbackup.sh
>
> But it isn't executed, anacron puts the following in /var/log/syslog:
>
> Jan 8 07:38:30 localhost anacron[5005]: Job `cron.daily' started
[...]
> Jan 8 07:41:36 localhost anacron[5005]: Normal exit (1 job run)
>
> As you can see anacron says "1 job run" but there are more files in my
> cron.daily directory:
The 'cron.daily' job is (effectively) this:
run-parts /etc/cron.daily
run-parts is a tool that executes all the scripts in a given location.
So, as far as (ana)cron is concerned it did run *one* job. The fact
that job executed multiple scripts is invisible (and irrelevant) to the
cron process.
> I have no clue what is wrong with my cron jobs.
> When I execute the script manually it runs without error.
> Any hints?
It may be that run-parts does not like your script name; try:
run-parts --test /etc/cron.daily
You may find a name without an underscore is better liked.
Alternately it may be that the different cron environment, without your
PATH settings, is causing issues. Don't assume much about the path in
cron jobs.
Regards,
Daniel
--
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707 email: contact at digital-infrastructure.com.au
http://digital-infrastructure.com.au/
More information about the kubuntu-users
mailing list