cron recipe error
Alan McKinnon
alan at linuxholdings.co.za
Thu Feb 23 09:13:20 UTC 2006
On Wednesday, 22 February 2006 21: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?
Your crontab line looks ok. This is a common problem. Usual solutions:
1. check executable permissions on script.rb
2. the way you have it, the first line of the script must be:
#! /bin/bash
3. If all else fails, try running the script as:
bash /home/dawson/script.rb > ...
alan
>
> 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
--
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
More information about the ubuntu-users
mailing list