cron recipe error

C Hamel yogich at sc2000.net
Wed Feb 22 18:57:01 UTC 2006


On Wednesday 22 February 2006 11:40, Chris Dawson wrote:
> 5 1 * * 0 /home/cdawson/script.rb > /home/cdawson/`date "+%Y-%m-%d"`.log
>
> I want this to run on Sundays at 1:05 am. The script is executable.
> It doesn't seem to run, and nothing is logged in the log file.  Any
> idea why?
>
> I think that I tried things like:
>
> 5 1 * * sun /home/cdawson/script.rb > /home/cdawson/`date "+%Y-%m-%d"`.log
>
> But this didn't work either.  After reading the man page, maybe "sun"
> was capitalized.  Can anyone tell me the correct recipe?
>
> Either way, it seems like the first one should run.  Man page says "0
> or 7 is Sun..."
>
> Thanks,
> Chris
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

HTH...
-- 
	...CH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060222/09b1a7e1/attachment.sig>


More information about the ubuntu-users mailing list