In this guide, we will explain how to set up a cron job for your application(s) on the Cloudways Platform.
Note: In this tutorial, we are scheduling a cron job to run every 5 minutes. You may choose to define your preferred scheduling option to set how often the cron job will run for your website.
To set up a new cron job on Cloudways:
Log into the Cloudways Platform with your credentials.
From the top menubar, click Applications and select the application you want to set the cron for from the list.
Go to the Cron Job Management section and click on the Add New Cron Job button.
Use the drop-down to select from the predefined values. Click the Common Settings dropdown and select the Every 5 minutes (*/5 * * * *) option.
Set the type of script that you will be running (PHP, curl, or wget) and the command to execute. Enter the following command in the Command textbox.
Click the Submit button to save the new cron job.
Your cron job will be listed under the Basic tab once done.
Info: The Basic tab does not allow any switches for wget and curl. You will need to utilize the Advanced tab to apply switches.
You can switch to the advanced editor under the Advanced tab, to the command line switches and other advanced cron settings.
Info: Only account owners or team members with full privileges can edit cron jobs via the Advanced tab.