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.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...