The job file

A cron job is simply a file the OS will call periodically for you. So just create a php file that will do what you want when you load it. This means if you use it as a browser address it will also run and do the cron tasks – handy for testing.

Setting the cron job to run

Using wget

Use the hosting cron tasks feature to cause a wget command to be run at the interval you require. An example:

*/15 * * * * wget -q -O - http://MYDOMAINNAME.com/my_cronfile.php?doing_wp_cron

Running the file without wget

Find the location of your file within the servers file system. You can likely just use your hosting file manager feature to locate the file and work out the full path to it.

For the cron command you need to specify the php exe to use to run your php file – search up how to specify this

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

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