Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php cron job every 10 minutes [closed]

Tags:

php

cron

crontab

I'm trying to run a cron job so that a php script will run every 10 minutes on my server. The script updates a database. Right now my crontab looks like:

* /10 * * * * /usr/bin/php  /home/user/public_html/domain.com/private/update.php

However, the php script never seems to run. I've also tried reloading cron after updating the cron tab with :

  $ /etc/init.d/cron reload

but this didn't work either. Does my current crontab look correctly formatted? Are there specific permissions that need to be specified on a file in order for it to run a script?

like image 688
minimalpop Avatar asked Dec 02 '09 02:12

minimalpop


1 Answers

There should not be a space between "*" and "/10". It should be:

*/10 * * * * /usr/bin/php  /home/user/public_html/domain.com/private/update.php
like image 169
malonso Avatar answered Nov 03 '22 12:11

malonso