The Joomla! Task Scheduler can execute using one of two scheduler types:

  • Lazy
  • Web Cron

Configuration of these schedulers is done in the Scheduled Tasks Options administrator panel. You should only enable one or the other scheduler, not both.

 

The Lazy Scheduler

Lazy scheduling relies on site activity. PHP code executes in the web server. By default, that means it runs based on activity on your site, such as browsing through pages in the site frontend or doing administrative work in the site backend. It also means that using lazy scheduling can impact the performance of your site as the Joomla! core must temporarily divert attention away from what the user is doing to execute whatever tasks have become due to execute.

Using the lazy scheduler does not guarantee your tasks will run at the scheduled times. But it is the scheduler enabled by default and the easier one to setup. You simply must enable it. But if you do have some tasks scheduled precisely using a Cron Expression, you may want to use the Web Cron scheduler.

The Web Cron Scheduler

Web Cron scheduling requires that you are able to create a "cronjob" in your hosting control panel or, perhaps, a third-party service. When you enable Web Cron scheduling, Joomla! creates a Webcron Link for you. This link must be used to create the cronjob in your hosting control panel. The typical way to do this requires using the curl service on the host's server. The sample command below will run the scheduler on mysite.com.

curl --request GET 'https://mysite.com/component/ajax/?plugin=RunSchedulerWebcron&group=system&format=json&hash=auto-generated-hash'

The Joomla! Cron Expression scheduler mimics how a cronjob scheduler works. The screenshot below shows the typical host control panel setup for a new cronjob (this is not part of the Joomla! administrator user interface). You'll want to setup this cronjob to run every minute to give your Joomla! Task Scheduler one-minute timing granularity. You can run it more slowly, of course, but you will lose task execution timing precision if you do.

Once you have your cronjob setup, you can disable the Lazy scheduler and enable the Web Cron scheduler. If you have both enabled at the same time, both will execute and your site may suffer performance degradation on the occasions where the Lazy scheduler happens to get to the ready task(s) before the Web Cron scheduler.