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?
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.
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?
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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now