In Joomla we can automatically run tasks. Several standard tasks are shipped with Joomla, of which some are scheduled by default. But how do you run tasks? What settings do you need? We’ll show you step-by-step how to do that.
Since Joomla 4.1 we can schedule tasks to be run automatically. Joomla! distributions include the following eleven built-in tasks (as of 6.1):
- Delete Action Logs - delete action logs after days
- Expiration of Privacy Consents - manage the expiration of privacy consents
- GET Requests - Make GET requests to a server
- Global Check-in - check-in checked-out items
- Image Size Check - check images; resize if larger than allowed
- Joomla! Update Notification - periodically check for new Joomla! versions
- Rotate Logs - periodically rotate the log files
- Set Site Offline - set site status to "offline" on each run
- Set Site Online - set site status to "online" on each run
- Toggle Offline - toggles the site's status on each run
- Session Data Purge - purges expired data and metadata
At the moment (Joomla 6.1) three of them are enabled immediately after installation or update of Joomla:
- Session Data Purge (every 24 hours).
- Joomla! Update Notification (every 24 hours).
- Rotate Logs (every 30 days).
Why is my Action Logs table so big?
Last month on Mattermost someone asked:
I’ve noticed that the user action log table in the database is very large – around 400 MB. I’ve checked the various options, scheduled tasks and log rotation, and everything seems to be in order.
It seems strange to me that the logs aren’t being cleared automatically.
Is there any other setting I should check?
And one of the answers was:
There is a scheduled task to run a log rotation which automatically clears old logs.
The logs are files, generally stored in the logs folder of the Administrator. In those files errors are logged, like for instance failed login attempts. Those logs will grow over time, but become less and less interesting. To clean them up we have the Rotate Logs task, that is automatically run every 30 days in a clean Joomla installation.
Here is the confusion: the Action Logs are not stored in those log files, but in a separate database table. So, the Action Logs, that store what actions have been done by whom inside Joomla, are not cleaned up with the the Rotate Logs task. They have their own Delete Action Logs task, that is not run by default on a new installation.
So let’s take that Delete Action Logs task as an example of how to automatically run such a task.
Add the task and set the timing
- Go to System → Scheduled Tasks.

- Click on the New button.

- Select the task to run. Here I selected the Delete ActionLogs task:

- Fill in the timing of the Task (Edit Task tab). Here I filled in to clean up the logs7 days, and then delete all actions in the log that are older than 30 days:

You can see some other possible settings to trigger the task to be done in the How to Schedule a Task article in the user guide.
That is all that is needed to run a task! Really simple.
Extra options for a task
Task specific settings can be found on the “Advanced” tab of the task. For instance for our Delete Action Logs task you’ll find the possibility to send notifications to specific user groups on task failure there:

Run the scheduler by an external trigger
By default the task scheduler is triggered by activity on the site. That means that the task is not automatically run exactly following the schedule, but that any activity on the site (frontend or backend) “awakens” the scheduler, and looks if there were any tasks scheduled between the last run date/time and now.
An advantage of this system is that you don’t need to configure anything to let it run. A disadvantage is that tasks in the scheduler are always run while there is some other activity on the site. The ideal would be that tasks are run when the site has no visitors at all. Then the task will not delay anything on the site. This can be done via a so-called Cron job.
In the task scheduler you can set such a Cron job via the Options (top right). In those Options you find two tabs for the two ways to trigger the scheduler:
- Lazy Scheduler: the default way to “wake up” the scheduler as soon as there is any activity on the site.
- Web Cron: an external system that triggers the scheduler to run.
You should enable one of the two, not both at the same time.
Lazy Scheduler
This is the standard way that is enabled by default. As said, the disadvantage is that when your site is already busy, it keeps triggering the scheduler, so some time intensive tasks can slow down the site further. To mitigate that disturbance we can set a request interval: how many seconds after the site activity will we start the scheduler? By default this is set to 300 seconds (5 minutes). So, if there were any tasks scheduled between the last scheduler run and the current site activity, they will only after this interval be run.

Web Cron
Generally the best way to configure the scheduler is via an external trigger. In that way you can schedule time-intensive tasks on a time the site is less visited. You do that in two steps:
- On the Web Cron tab enable Web Cron. Save this and then you can find a URL in the Webcron Link field. Anytime this URL is called from anywhere, the task scheduler is triggered to do its work.

- Now, on some external service, typically a so-called Cron Job, this URL from step one is called on some schedule. Yes, this is another schedule, outside Joomla, that triggers the Joomla scheduler. If you use a Cron Job on your server, for instance via cPanel, then you cannot directly call this URL, but you have to give a
curlcommand plus the above copied URL:curl https://mysite.com/component/ajax/?plugin=RunSchedulerWebcron&group=system&format=json&hash=auto-generated-hash. How often do you want this external scheduler to trigger the Joomla scheduler? It depends; if you want to use the Joomla scheduler fine-grained, then call it every minute. But if you for instance would be sure you only want to run scheduler tasks at night, then you can also only trigger the Joomla scheduler at night.
Also see the How to Choose a Scheduler article in the user guide.
More information
- Scheduled Tasks in the user guide.
- Scheduled Tasks article in Joomla Community Magazine, November 2023, by Marc Dechèvre.
- The incredible possibilities offered by the Scheduled Tasks in Joomla, collected information by Marc Dechèvre.
- Custom Plugins, part 2: Task Plugin article about creating your own task plugin, in Joomla Community Magazine, May 2026, by Herman Peeren.

Comments