WPCloudDeploy Documentation

WPCD Cron Jobs


WPCloudDeploy uses a log of background Cron jobs to get things done.  If you are not using the WPCD Better Crons method to fire our background process then certain WP CRON jobs need to be running every 1 minute or so.

In order for servers and sites to be deployed properly, the WP CRON service needs to be working.  In particular, the following THREE cron jobs (cron-hooks) need to be running on the server where the WPCD plugin is installed:

  • wpcd_wordpress_deferred_actions_for_server
  • wpcd_wordpress_deferred_actions_for_apps
  • wpcd_wordpress_file_watcher

When the plugin is first installed, these are probably running. But, over time, if other things are installed on your WordPress site, these processes might not start up or might have been killed.

The easiest way to check that they are installed and running is to install the WP CRONTROL plugin from wordpress.org.  Afterwards, go to the TOOLS → CRON EVENTS screen and in the search box on the upper right of that screen, enter “wpcd”.  You should then see the following screen:

Notice that there are six items in the above image but the 3 cron jobs listed earlier above are the most critical when deploying a site.  If the three items are NOT shown, you should deactivate and reactivate the WPCD plugin.

If all six items in the image above are not shown in your installation then you also consider starting an investigation into a root cause.

Additional Cron Jobs for Premium Add-ons

The Power Tools add-on include an additional three cron jobs as well:

  • wpcd_scan_scheduled_apps
  • wpcd_scan_scheduled+servers
  • wpcd_scan_scheduled_apps_automatic_image

These additional cron jobs are not required when deploying a new site.  But, if any are missing you should consider initiating a root-cause investigation (if disabling and re-enabling the plugins do not remedy the issue).

Cron Related Email Notifications

As of version 4.16, if we detect that any of these cron jobs are not running you will receive an email.  The email is sent once every 8 hours but can be turned off under WPCLOUDDEPLOY → SETTINGS → MISC in the CRON WARNING EMAILS section.

You might get an occasional email if a blip occurs (eg: during a plugin update or some other transient PHP error or maybe caused by a plugin conflict).  But if you continue to receive them on a regular basis then you should definitely start to investigate why they are being disabled.

Crons Not Running Often Enough

We recommend that a LINUX CRON be configured to force the WP CRON service to fire at least once per minute.  Otherwise, the WP CRON process might not run often enough leaving cron jobs to run late.

If we have installed the core WPCD server for you or if you use our pre-built images at DigitalOcean or AWS, LINUX CRONS are already set up to run once per minute.