As previously mentioned, WP-Cron does not run continuously, which can be an issue if there are critical tasks that must run on time. There is an easy solution for this. Simply set up your system’s task scheduler to run on the intervals you desire (or at the specific time needed). The easiest solution is to use a tool to make a web request to thewp-cron.phpfile.
After scheduling the task on your system, there is one more step to complete. WordPress will continue to run WP-Cron on each page load. This is no longer necessary and will contribute to extra resource usage on your server. WP-Cron can be disabled in thewp-config.phpfile. Open thewp-config.phpfile for editing and add the following line:
Windows calls their time based scheduling system the Task Scheduler. It can be accessed via theAdministrative Toolsin the control panel.
How you setup the task varies with server setup. One method is to use PowerShell and a Basic Task. After creating a Basic Task the following command can be used to call the WordPress Cron script.
Mac OS X and Linux both use cron as their time based scheduling system. It is typically access from the terminal with thecrontab -ecommand. It should be noted that tasks will be run as a regular user or as root depending on the system user running the command.
Cron has a specific syntax that needs to be followed and contains the following parts:
Minute
Hour
Day of month
Month
Day of week
Command to execute
If a command should be run regardless of one of the time sections an asterisk (*) should be used. For example if you wanted to run a command every 15 minutes regardless of the hour, day, or month it would look like:
*/15 * * * * command
Many servers havewgetinstalled and this is an easy tool to call the WordPress Cron script.