Categories
How to

How to run WordPress Cron from CLI

I prefer to run cronjobs from the CLI instead of a web call.
This mostly due the memory and timeout limits that you can run into when you do use a web based cronjob.

To configure this you first have to disable the web cron within WordPress.

Then you can add the following cronjob to make it run every 10 minutes.

Optionally disable the output

Now you are sure that the job runs and finishes without it depending on how much visitors you have or timeouts that can occur.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.