Joomla Extensions
Planned tasks
Scheduled tasks in Joomla are automated processes that run at preset times. These tasks help with routine maintenance tasks, such as deleting old log files, sending notifications, or modifying data. Scheduled tasks are available from Joomla 4.1 and higher.In this article, I will show you how to set up these tasks and which tasks are all available.
How to set scheduled tasks?
- Go to your Joomla backend.
- Navigate to System > Scheduled Tasks.

There you will see an overview of all tasks set on your website. Depending on your Joomla version and/or history, these may be different tasks for each website. On a new installation of Joomla 5, these tasks are active.

In principle, you do not need to modify these tasks, but we will now open the Update notification plugin, by clicking on its title, to see what the plugin looks like.

At the top, you can see the buttons to save or close the task.
The Title is an administrative title, so it is only used so you can quickly find the right task.
In the first tab, you see the basic fields, these fields are the same for all task plugins.
Execution rule: Select the interval here, when a plugin should be executed. You can choose from Minutes, Hours, Days, Months, Cron expression or manual
Interval in ... : You can enter a number here e.g. 3
The task is then executed as the above settings. For example: Months and 3, then the task is executed once per quarter.
Under the basic fields you will find the task fields. In this case, you can enter an email address, but this is not relevant for every task. So these fields are different for each task.

The advanced tab is divided into 3 sections.
Priority: Here you can define the order in which tasks are executed at the same time. Generally, you don't need this for the average website.
Logging: When a task fails, it is useful to know why this happened. With an individual task log, you can create a separate file for this.
Notifications: Send a notification when a task succeeded, failed, caused errors or refers to parts that are no longer used on the website.

The 3rd tab "Execution history" shows the status of the task plugin. When was this task last executed, when is the next time it will be executed. How many times the task was executed and how many times it went wrong.
Adding new tasks
In the tasks overview, you have the New button at the top

Image size check: This task checks images in a specific folder, resizes the image if it is larger than allowed. It is a useful plugin, when the administrator or visitors put images on the website themselves without regard to optimisation.Note: The original file is overwritten!
Remove action logs: When you keep track of what actions are performed on the website, the action log can grow quickly. You probably don't want to keep all the information and throw it away after 3 months, for example. For that, this plugin is suitable.
General check-in (since Joomla 5): Do you know the locks for an item. Often someone has locked this item incorrectly and then it remains locked. With this plugin, you can reactivate the checked-out items after a certain time.
Get Request: Create a Get request for a URL you want to run at a certain time.
Expire Privacy permission: If you use the Joomla privacy suite, then users have to give permission for sharing information. This plugin manages consent and sends reminders when consent expires.
Rotate Logs: This plugin's main function is to automatically rotate log files, meaning older log files are moved or deleted to save space and optimise your website's performance.
Clear Session Data: The "Clear session data" feature in Joomla is designed to delete temporary session data stored by the website. Session data is used to store information about users during their visit to the website, such as logged-in status, preferences and other temporary data.
Offline switching: The website is switched offline or online every time the plugin is processed. (To be honest, I can't think of a use case why you would want to do this, do you know? Let me know via the contact form;) )
Putting the site online / offline: If you want to take the website offline at a specific time (when it should not be accessible on Sundays for religious reasons, for example), you can do that with these plugins. Or the website needs to be launched at a specific time and you can't do this manually because you are not available. That too is possible with this plugin.
Joomla Update notification: This plugin in Joomla is designed to notify you via e-mail of available updates for your Joomla installation.
How are scheduled tasks triggered?
You can find these settings in the task overview under the "options" button in the top right corner.
By default, a task is triggered by an activity on the website, i.e. when a visitor opens the website. This is called Lazy task scheduler.

In many cases, this is fine. But when you don't have a visitor at that moment, the task won't be executed either. For example: You want to backup your website every night at 2am. This task is only performed when the first visitor opens the website in the morning. You don't want that.
You can also have the tasks triggered by a cron job.
Switch on the web cron and you will now see a link.
You can use this link in your hosting party's system which handles cronjobs.

If you can't set up a cronjob on your hosting package or don't know what the right settings are, I recommend using https://cron-job.org.
Set up cronjobs via cron-job.org

Through the website cron-job.org you can run simple cronjobs through a free account.
After creating a free account, you can create cronjobs.
Enter a title.
Paste the url from your Joomla website.
Enter when the cronjob should be run.
And save it.
This way, the cronjob is always executed exactly at your desired time.

Exit codes / Error codes for scheduled tasks
-2 : INVALID_EXIT = Used when a routine returns an invalid (non-integer) exit code.
-1 : NO_EXIT = Used when a routine does not return an exit code.
1 : RUNNING = Used when the routine is just starting. This is not intended as an exit code.
2: NO_LOCK = Used when a routine cannot obtain a pseudo-lock.
3: NO_RUN = Used when unable to execute the task.
4: NO_RELEASE = Used when unable to release the lock or update the record.
5: KNOCKOUT = Used when a routine is "disabled" by an exception.
123: WILL_RESUME = Used when a task needs to be resumed. Use this for long-running tasks to split them into smaller batches. When the last batch has been executed, return Status::OK.
124: TIMEOUT = Used when a task has a timeout.
125: NO_TASK = Used when a task does not exist.
127: NO_ROUTINE = Used when a routine is missing.
0: OK = This is the exit code on success.
Scheduled task plugins
Several scheduled task plugins can be found, some developers have created a task plugin to complement their extension. Below, I will discuss my favourite plugins:
Akeeba Admin Tools PRO:
https://www.akeeba.com/products/admin-tools.html
PHP File Change scanner: This plugin scans all php files for changes and suspicious code
Blocked Requests Log cleanup: Clears the blocked action log
Session table repair & optimise: Repairs and optimises the #__session database table
Clean up session metadata: Removes obsolete sessions in the #__session database table
Cache clean-up: Clean up cache
Delete inactive users: delete users based on your criteria (never logged in or account not activated for a certain period of time)
Clean up the temporary directory: Delete all files in the tmp folder
Auto-import configuration: Import the configuration from a central file
Akeeba Backup PRO:
https://www.akeeba.com/products/akeeba-backup.html
Take a Backup: Make a backup via a selected profile
CLI-only Backup: A backup will only run if triggered via CLI
SchuWeb Sitemap:
https://extensions.joomla.org/extension/schuweb-sitemap/Updatesitemap XML: This sitemap extension creates a /sitemap.xml file. The task plugin ensures that the file is updated with all pages, images and news items.
DPMedia:
https://joomla.digital-peak.com/documentation/dpmedia/joomla-plugins/task
Media Sync: Sync remote files with local files
Sync Local media files: Sync local files with cloud services
DPCases:
https://joomla.digital-peak.com/documentation/dpcases/plugins/task
Send notification to author when a case is about to be closed
DPCalendar:
https://joomla.digital-peak.com/documentation/dpcalendar/joomla-plugins/task
Sync Events: Synchronise the website with external calendars
Send ticket certificates: Send a certificate when the event has ended
Booking deletions: Delete bookings with certain criteria
Event deletions: Delete events with certain criteria
Event reminders: Send reminders
HikaShop:
Mass Action: Perform a bulk action(https://www.hikashop.com/marketplace/product/284-task-massaction.html)
Task Report: Create a report and send it as an email attachment(https://www.hikashop.com/marketplace/product/283-task-report.html)
Zero24 ExtensionUpdates:
https://extensions.joomla.org/extension/extensionupdates/Controleertfor updates to extensions and sends an email as soon as they become available.
Zero24 TaskCheckin:
https://extensions.joomla.org/extension/taskcheckin/Dezeplugin checks all items in (only for Joomla 4, as there is a core plugin in Joomla 5 that does the same thing)
Zero24 ReviewContentNotification:
This Joomla plugin checks if an item has not been changed for a certain period of time. It notifies the author and asks him if the content of the article is still correct.
TLWebdesign Auto Delete Files:
https://github.com/TLWebdesignNL/Auto-Delete-Files-Task-Scheduler-PluginDezeplugin checks files for last edit (PHP's filemtime function) and deletes files older than the set time.
Kick Manage Article:
https://github.com/Kicktemp/plg_task_kickmanagearticleVerplaatsan article to another category when it is older than X days
CCC Timewarp:
https://coolcat-campus.com/en/extensions/joomla-task-scheduler-plugin-ccc-timewarp
Adjust an article (category, special, status, permissions) when it is older than X days, this plugin also works with custom fields data.
Reset Hits:
https://github.com/woluweb/plg_task_resethits
Reset article views to 0, useful to use when you want to show a list of this month's popular articles.
Delete Trashed:
https://www.alikonweb.it/extensions/task-plugin-delete-trashed
Deletes items from the trash (not just articles, but also categories, modules, references, etc.).
Force password reset:
https://myjoomlacoder.com/joomla-task-plugins/joomla-force-password-reset-task-pluginZorgtEnsure that users of selected groups have to reset their passwords periodically. You can set different periods for different user groups. When the task is executed, the user is forced to reset their password after the next login
End Users Sessions:
https://myjoomlacoder.com/joomla-task-plugins/joomla-end-users-sessions-task-pluginGebruikerswill be forced to log in again if Remember Me is not enabled. You can select whether to apply it for both the front and backend or just the frontend.
Manage Inactive Users:
https://myjoomlacoder.com/joomla-task-plugins/joomla-manage-inactive-users-task-pluginhelpthelp you manage inactive users. By inactive users we mean: Users who have never logged in after registration. Users who have not logged in for a certain period of time. Users who have not activated their account. You can choose how to deal with them by blocking or deleting them after a certain period of time.
FT Auto Update:
https://extensions.joomla.org/extension/tf-auto-update/
This plugin allows you to update or delete data in the database.
Migrate user profiles to custom fields:
https://kicktemp.shop/produkte/kickprofiletocustomfield
Move an old Joomla user profile to custom fields. (These custom fields are easier to use in Yootheme elements, for example).
Prevent automation from becoming a nightmare.

About Jeroen
I have been working with the Joomla! CMS since 2006. Besides building and maintaining Joomla! websites and webshops, I am also familiar with search engine optimization (SEO), Joomla hosting and developing templates and extensions. Furthermore, I am a frequent visitor and speaker at JoomlaDays and various Joomla user groups.
I am committed to the Joomla! community as a member of the Extensions Directory team and the organization of Joomla user group Breda and JoomlaDagen Netherlands. In short: Are you looking for a Joomla Specialist, you should contact me!
Nederlands
English