Gentoo Archives: gentoo-server

From: Jonathan Rogers <jonner@××××××.net>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] cron not doing backup
Date: Sat, 13 Nov 2004 09:12:38
Message-Id: 4195CFFA.6010906@teegra.net
In Reply to: Re: [gentoo-server] cron not doing backup by Ben Munat
1 Ben Munat wrote:
2 > I don't mean to be a pain, but I'm confused.
3 >
4 > I have a crontab file in /etc with this in it:
5 >
6 > # check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
7 > 0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
8 > 1 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily
9 > 15 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
10 > 30 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
11 > */10 * * * * root test -x /usr/sbin/run-crons &&
12 > /usr/sbin/run-crons
13 >
14 > Scripts I put in the cron.* directories run just fine... and these are
15 > running as root, right? So, I put a script owned by root in the
16 > cron.daily directory and the script runs, but doesn't actually do the
17 > backup... even though the cron entry is owned by root?
18
19 Yes, the programs in /etc/cron.* are running as root, but probably not
20 with exactly the same environment as when you run them from a login
21 shell. The cron daemon should mail the output from your script if it
22 fails. If you can get the error messages, I might be able to help.
23
24 Jonathan Rogers

Replies

Subject Author
Re: [gentoo-server] cron not doing backup Ben Munat <bent@×××××.com>