To improve performance in Drupal, we recommend disabling the built-in cron system in Drupal and run cron on the server side instead. This will offload the website and may cause significant improvements to the TTFB (Time to first Byte).
Here's how to setup cron the right way with Drupal.
1. Disable Drupal built-in cron system
Edit the settings.php file for your Drupal website and add the following line:
$conf['cron_safe_threshold'] = 0;
2. Setup cron in our admin panel
Go to the settings page for your website in our admin panel. Enter the following in the field for time:
*/10 * * * *
This will make the cron job run once every 10 minutes.
In the command field, enter this command:
drush --root=/kunder/group/user/public/ --uri=yourdomain.com --quiet cron
Note that you need to replace the root-paramenter with the complete path to your folder and the uri-parameter with your domain name.
Click the "Add" button and the cron job will be saved.
If you don't want to receive emails when your cron jobs have been executed, select the (newly created) cron job in the list of this page and, in the drop-down box below, select "Do not send email". Click the "Update" button in the bottom of the page.
You may still receive email messages regarding cron jobs if an error occured during the execution of the cron. To get rid of these emails, just fix the (code related) errors.