PDA

View Full Version : Cron Frustration



BrianUK
05-22-2009, 04:12 AM
One of my users has setup a cron to run every 5 minutes using the correct parameters however for some reason it's only running every hour.

Also i've just noticed that the server time (which is correct) is an hour ahead of log times could this be the issue also how can I fix this.

tillo
05-22-2009, 04:26 AM
Give us some more informations, at least the complete cron line. Also check the result of the command "date", it shows the timezone (usually 1 hour shift means that DST was not activated/deactivated).

BrianUK
05-22-2009, 04:33 AM
Sorry was hurried post

5 * * * /usr/bin/lynx -dump http://www.domain.com/index.php?blah[cronjob]=all

I've obviously changed domain and other info however it runs fine via shell and via cron every hour

Fri May 22 11:29:59 BST 2009

tillo
05-22-2009, 04:49 AM
That crontab is wrong. If you want it to run every 5 minutes, here it is:


*/5 * * * * /usr/bin/lynx -dump 'http://www.domain.com/index.php?blah[cronjob]=all'

Yours runs every hour at minute 5, and is also missing a field. There are 6 of them: minute, hour, day, month, day of week, command.