NeoSniperkiller Posted June 18, 2011 Posted June 18, 2011 hello I made a php script that should be run 2 times a day (00-12 o clock). I've discovered the cron jobs page on my hosting account, but what must i type into the command section so that it would run the php page? Quote
Byron Posted June 18, 2011 Posted June 18, 2011 Minute - 0 Hour - 0,12 Day - * Month - * Weekday - * For no emails: php -q /home/byron/public_html/cron.php >/dev/null 2>&1 For emails: php -q /home/byron/public_html/cron.php >/dev/null 2>&1 Don't forget to change the path to home1 if that is your path and the username to your username. Quote
NeoSniperkiller Posted June 18, 2011 Author Posted June 18, 2011 Minute - 0 Hour - 0,12 Day - * Month - * Weekday - * For no emails: php -q /home/byron/public_html/cron.php >/dev/null 2>&1 For emails: php -q /home/byron/public_html/cron.php >/dev/null 2>&1 Don't forget to change the path to home1 if that is your path and the username to your username. just a quick notice, both commands are the same I guess for emails, leave the >/dev/null 2>&1 away? Quote
Byron Posted June 18, 2011 Posted June 18, 2011 just a quick notice, both commands are the same I guess for emails, leave the >/dev/null 2>&1 away? That's correct. As long as your cron script sends something to the browser and you leave that off, you'll get an email each time cron runs. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.