cron recipe error
Derek Broughton
news at pointerstop.ca
Wed Feb 22 20:36:45 UTC 2006
C Hamel wrote:
> On Wednesday 22 February 2006 13:25, Chris Dawson wrote:
>> This is only for the system crontab, correct? I am using this in my
>> user account crontab. From the man page under heading "EXAMPLE SYSTEM
>> CRON FILE":
>>
>> ...
>> # This file also has a username field, that none of the other crontabs
>> # do
>> ...
>>
>> So, I don't think I need the username field, right?
>>
>> >
>> > For one thing, there are five fields prior to specification of the prg
>> > you wish to run. Also, make certain your script is executable via
>> > permissions. I run nightly backups on /home and have done it thus:
>> >
>> > 30 05 * * * root home_backup >/dev/null 2>&1
> Try that line I gave you and see if it works. ;-) It should. I've used
> it on SuSE v8.2,9,10, Gentoo, & now Breezy.
Chris, you're right. You're NOT using the system crontab and your version
should work. Do you have gcrontab or kcron installed (GUI crontab
editors)? I'd try that to enforce syntax (though I've found kcron isn't
perfect). I put yours into my crontab, edited it in kcron, then read it
back out, and this is what I ended up with:
5 1 * * 7 /home/cdawson/script.rb > /home/cdawson/ate "+%Y-%m-%d".log
so I'd recommend using 7, even if the man page says 0 or 7.
C. Hamel - you count oddly: there are six fields before the command in your
version, which is of course correct for /etc/crontab but not for user
crontabs.
--
derek
More information about the ubuntu-users
mailing list