I have a WordPress plugin which doesn't work with WordPress' cron. I don't know why, it just doesn't, so I had to move the cron job to server side.

At the moment I'm using

php --no-check-certificate https://example.com/path/to/file.php

The full code is:

*/10    *   *   *   *   php --no-check-certificate https://example.com/path/to/file.php

I read that I had to add --no-check-certificate considering it's https.

I tried simplywget https://example.com/path/to/file.php, but didn't work. Any idea how I can make it work?

  • I think you should contact to plugin developer. Mar 12, 2015 at 9:08
  • What errors are you getting?
    – MrWhite
    Mar 12, 2015 at 11:01

1 Answer 1


Is the cronjob supposed to access a web location via HTTP in order to make it execute instead of not directly executing it with the PHP executable?

Shouldn't it be something like:

*/10 * * * * wget -O /dev/null --no-check-certificate https://example.com/path/file.php

Also, --no-check-certificate is a switch of wget, not php.

  • I don't know how to answer your question directly due to my lack of knowledge about cron jobs. What I do know is that the cron job should execute the php file the same way I would execute it manually in the browser by copy pasting the direct link. I added your command to see if it works. Hope it does. Thanks. Mar 16, 2015 at 13:51
  • The cronjob I suggest is just accessing the webpage as you were visiting it through a web browser. That will cause web server to run the PHP script for you. I believe my answer is correct since your example had --no-check-certificate that is a switch for wget. The cronjob is just running this command and saving output to /dev/null. If you'd rather use the output as a log, you can change this location to a real file. Mar 16, 2015 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.