How to set up a php cron job on godaddy.com (with command sample)

The command:
/usr/local/bin/php /home/myaccount/public_html/folder_name/mycron.php

If you don’t know the path, you can use “dirname(__FILE__)” to get it.

If you want to test it, set time to “every minute”. If it output something on the webpage: mycron.php, like echo, “this will be shown on the webpage”; , it will send you an email. If no output to the webpage, no email.

Leave a Reply

Your email address will not be published. Required fields are marked *