How To: Set up a cron job on Cloudways

A cron job on Cloudways allows scheduled WordPress tasks to run automatically at a defined interval instead of relying on the default WordPress WP-Cron process. To set up a cron job on Cloudways, first disable WP-Cron in your website’s wp-config.php file, then create a cron job for your application through Cloudways Cron Job Management.

You can select a predefined schedule, such as every five minutes, or configure advanced cron settings when your command requires additional switches or options.

Disable WP-Cron

Open your website’s wp-config.php file and add the following line before:

“That’s all, stop editing! Happy blogging.”

define(‘DISABLE_WP_CRON’, true);

Save the changes to your wp-config.php file.

Note: The example below schedules the cron job to run every 5 minutes. You can choose a different schedule based on your website’s requirements.

Create a Cron Job in Cloudways

  1. Log in to the Cloudways Platform.
  2. From the top menu, select Applications.
cron job on Cloudways
cron job on Cloudways
  1. Select the application where you want to configure the cron job.
  2. Navigate to Cron Job Management.
  3. Click Add New Cron Job.
  4. Open the Common Settings dropdown and select Every 5 minutes (*/5 * * * *).
cron job on Cloudways
cron job on Cloudways
  1. Select the type of script you want to run, such as PHP, curl, or wget.
  2. Enter the following in the Command field:

wp-cron.php?doing_wp_cron

  1. Click Submit to save the cron job.

Once configured, the cron job appears under the Basic tab.

cron job on Cloudways
cron job on Cloudways

Configure Advanced Cron Settings

If you need to use command-line switches or other advanced cron settings, switch to the Advanced tab in Cron Job Management.

cron job on Cloudways
cron job on Cloudways

Note: The Basic tab does not provide switches for wget and curl. Use the Advanced tab when these options are required.

,Only account owners or team members with full privileges can edit cron jobs through the Advanced tab.

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

This field is for validation purposes and should be left unchanged.
This field is hidden when viewing the form