Jump to content

Recommended Posts

Posted

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?

Posted

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.

 

 

Posted
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?

Posted
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.

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...