Calling wp-cron.php using a real cron job - wget or curl?


Cannor

Recommended Posts

Hi everyone.

 

Recently, my wp-cron.php mysteriously stopped working, and after a bit of digging I found this was the cause of all the "Missed Schedule" errors I was getting for scheduled posts in WordPress.

 

I found how to set up a manual cron in CPanel using wget to call wp-cron.php every X minutes, although I've also seen a method that uses curl. Is one better for use with HawkHost than the other, or doesn't it matter?

 

Cheers!

 

Link to comment
Share on other sites

Hi everyone.

 

Recently, my wp-cron.php mysteriously stopped working, and after a bit of digging I found this was the cause of all the "Missed Schedule" errors I was getting for scheduled posts in WordPress.

 

I found how to set up a manual cron in CPanel using wget to call wp-cron.php every X minutes, although I've also seen a method that uses curl. Is one better for use with HawkHost than the other, or doesn't it matter?

 

Cheers!

 

You can use either they achieve the same thing. One thing to note is make sure you pipe the stuff to /dev/null otherwise every time your cron runs it'll download the file to your /home directory.

 

 

wget http://www.yourdomain.com/wp-cron.php -O /dev/null
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...