setting a cron job

James Gray james.gray at dot.com.au
Mon Mar 10 01:46:34 UTC 2008


On Mon, 10 Mar 2008 12:13:28 pm James Gray wrote:
> On Mon, 10 Mar 2008 12:01:33 pm Jamie Griffin wrote:
> > ok... I've managed to edit the file successfully but now it doesn't seem
> > to run. I've added the line:
> >
> > 2 * * * * * /usr/bin/getmail
> >
> > to the file but it's not fetching mail, or doesn't appear to be. Does it
> > look as though there's something wrong with what i've done?
>
> That will run at 2 minutes past the hour, every hour.  Check
> /var/log/syslog to see information about crond's operation.  If you wanted
> to run a command at more regular intervals you can separate the values with
> commas or use a divisor:
>
> */15 * * * * * /some/command
              ^^^
           DAMMIT!!

>
> and
>
> 0,15,30,45 * * * * * /some/command
                    ^^^
                 DAMMIT!!


That serves me right for cutting and pasting the OP's cron line! D'oh!  As 
other have pointed out, there should only be 5 columns in the time 
definition, not six.

Thought I should correct this for the archives.

Cheers,

James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1357 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080310/e0e343c5/attachment.bin>


More information about the ubuntu-users mailing list