By Marc Dechèvre on Monday, 20 November 2023
Category: November

Scheduled Tasks

Since version 4.1 (and so also in 5.x series) Joomla introduced a very interesting new feature called "Scheduled Tasks".

Even though it has been present for more than two years, everytime I exchange with other Joomlers I realize that the majority has overlooked the power of this feature.

So the goal of this article is to shed some light on the possibilities at the hand of different examples / usecases:

Other sources about the Task Scheduler

Quite luckily different people have already produced interesting content about the Task Scheduler.

So let me start by thanking and referencing them:

Scheduled Tasks - native Plugins

Go to your backend > System > Scheduled Tasks.

Click on the New button and see what is already natively available in J5:

My favourite ones are:

Scheduled Tasks - third-party Plugins

A Task Scheduler to check-in all your Content in J4

As mentioned above, in Joomla 5 there is a Native Plugin to check-in all your Content. But what is your website is still running J4?

See https://github.com/zero-24/plg_task_checkin

A Task Scheduler to auto-delete files

What about auto-deleting files older than a certain timeframe in a given folder only (and not its subfolders)

See https://github.com/TLWebdesignNL/Auto-Delete-Files-Task-Scheduler-Plugin

A Task Scheduler to change different Parameters of Articles automatically

What about being able to move Articles to other Categories in function of a certain date (or do similar things)

Task Scheduler – Kick Manage Article

A Task Scheduler to move articles from some Category to another Category when older than X days, based on the following dates:

See https://github.com/Kicktemp/plg_task_kickmanagearticle  

Task Scheduler – CCC Timewarp (coming soon)

With this plugin, you can

This is particularly practical if you use Joomla Articles to display Events, but also, for example, to make your news only available to a closed circle for x days and only make them public after some time.

NB: on top of the usual Types of Dates, you can also use a Custom Field of Type Date in your conditions, which is handy.

See https://coolcat-campus.com/en/ 

A Task Scheduler to Reset Hits

For a given project where I needed to display "the most popular Films of the month", I wanted to reset the number of Hits on the 1st day of every month.

See https://github.com/woluweb/plg_task_resethits 

A Task Scheduler to synchronize my Custom Fields with some external Web Service

Yet for another project I needed to synchronize the value of 20 Custom Fields for 300 Articles with the latest data coming from some external Web Service.

Let's take a practical example: social.brussels is a kind of Directory of all Social Services and Associations in Brussels. You can access the details of each organization

On the Joomla website there are hundreds of articles having Custom Fields for the Address, Phone number etc.
So the idea was to automate a daily synchronization between the external source and our website so that the end users would not spend hours every month checking whether some information were outdated since last time...

See https://github.com/dgrammatiko/plg_task_json2cf

A Task Scheduler coming along some Extensions

As mentioned in the Sources, some extensions provide their own Task Schedulers. Examples:

Scheduled Tasks - create your own (and share)!

As you can see from the above-mentioned examples, the sky is the limit: for every need you can invent your own Scheduled Task.

This would be a nice topic for (yet) another article in the Joomla Community Magazine in the coming months: develop different nice usecases for Scheduled Tasks like:

So please share in the comments below your ideas/suggestions of Scheduled Tasks!
And if you already wrote one, please share the link so that everybody can enjoy...

Leave Comments