Gentoo Archives: gentoo-server

From: Ben Munat <bent@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] cron not doing backup
Date: Sat, 13 Nov 2004 08:30:54
Message-Id: 4195C6DA.7070701@munat.com
In Reply to: Re: [gentoo-server] cron not doing backup by Jonathan Rogers
1 I don't mean to be a pain, but I'm confused.
2
3 I have a crontab file in /etc with this in it:
4
5 # check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
6 0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
7 1 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily
8 15 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
9 30 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
10 */10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons
11
12 Scripts I put in the cron.* directories run just fine... and these are
13 running as root, right? So, I put a script owned by root in the
14 cron.daily directory and the script runs, but doesn't actually do the
15 backup... even though the cron entry is owned by root?
16
17 Sure, I can use the crontab program to add a traditional cron job entry,
18 but then what's the point of having the nifty little directory setup?
19 I'd just prefer to stick to one way of doing it. So, is there some way
20 to make this work with a script in the cron.* dirs?
21
22 thanks,
23
24 Ben
25
26
27
28
29
30 Jonathan Rogers wrote:
31 > Ben Munat wrote:
32 >
33 >> Hmm, so, when I type crontab -e as root, I get a blank editor... what
34 >> am I supposed to type? I've always just put my cron scripts in the
35 >> cron.<timeperiod> folders...
36 >
37 >
38 > man 5 crontab
39 >
40 > Jonathan Rogers
41 >

Replies

Subject Author
Re: [gentoo-server] cron not doing backup Jonathan Rogers <jonner@××××××.net>