cron recipe error

C Hamel yogich at sc2000.net
Wed Feb 22 19:57:47 UTC 2006


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?
>
> Chris
>
> On 2/22/06, C Hamel <yogich at sc2000.net> wrote:
> > 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
> >
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
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.
-- 
	...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/9ede2840/attachment.sig>


More information about the ubuntu-users mailing list