Cron jobs - advice requested

I’m being advised (https://youtu.be/1-csY3W-WP0) by a plugin (Groundhogg CRM) to use an external and free cron job service (cron-job.org).

As I know next to nothing about this I have always left it to the Wordpress application to automatically administer this side of things.

Can anyone advise about the implications of switching to an external cron job provider. This looks like a free lunch and that always makes me suspicious. As I need to turn off WP-cron completely will I then need to set up all sorts of jobs I don’t understand, or will it all just work?

1 Like

I am not sure about the external cron job service, but it is a best practise if you disable the cron jobs in wp-config and then set it up on the cloudways platform like this

*/15 * * * * wget -q -O - https://your-domain.com/wp-cron.php?doing_wp_cron

1 Like

As Tasos says - Cloudways already provides server-based Cron, so there’ sno need to add the extra complexity of a 3rd-party service.

The challenge with WordPress’s built-in “pseudo-cron” is that it only runs when a visitor hits the site. This can be a problem for tools that need to run at a specific time, because if there’s no traffic to the site at that time, the task won’t run. And conversely, if your site gets hit with a lot of traffic at some times, the cron tasks are running far too often, wasting server resources.

How frequently you set the server cron to run will depend on the needs of your own site.

And critical to note - if you use Varnish caching on the site, you MUST set the https://example.com.com/wp-cron.php?doing_wp_cron as an exemption in Varnish to keep from being cached.

1 Like

Apologies for the ridiculous question - I’m not at all experienced with the back end side of things and want to avoid a daft mistake. I was under the impression this would be set for the server, but it appears as though I set it under application management, is that correct?
https://support.cloudways.com/scheduling-cron-job-from-console/

Imagine that the applications are isolated containers on the server. Some settings can be added exclusively for one of them, but others need to be for the full server. For example, the PHP version we need to choose in Cloudways affects the whole server, but the cron-jobs are only for that container.

Thanks for taking the time to respond. I found reference to something similar when surfing around this forum and noticed it was set in the application settings just as you describe, so I went ahead and applied your code their. All seems to be working fine. Thanks again.