setting a cron job
James Gray
james.gray at dot.com.au
Mon Mar 10 01:13:28 UTC 2008
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
and
0,15,30,45 * * * * * /some/command
Both do exactly the same thing :) If you want to run a command every 5
minutes put "*/5" in the first column, asterisks in the remaining time
definition columns, then the command you want to run.
HTH,
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/646a6c11/attachment.bin>
More information about the ubuntu-users
mailing list