setting a cron job
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
*/15 * * * * * /some/command
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1357 bytes
Desc: not available
More information about the ubuntu-users