Figure: Global sharing
Depending on the task, there are different “task parameters ”. For example, with this task you can set how long the post must have been blocked before it can be automatically unlocked.
That's it for now. Under "Advanced " you can specify whether this task should be logged and what happens in the event of an error.
But before macedonia phone data the task works, you have to activate the whole thing in the options. Use options (top right) to make sure that the " Lazy Scheduler " is activated. This ensures that a trigger is sent to the scheduled tasks every time the website is visited at the specified interval. If this is deactivated here, no tasks will be processed.
Figure: Lazy scheduler
n address that you can use to trigger the cron job externally. This would, for example, trigger a task that creates a backup even if no one is currently visiting the site. Important tasks should be triggered in this way. To do this, simply add the ID of the cron job to the end of your cron job get request: e.g. &ID=3 .
Starting with Joomla 5.2, you should be able to trigger all tasks at once without having to attach the ID; a corresponding pull request has already been prepared for this.
Figure: Web-Cron
Another option is to access scheduled tasks via CLI. The commands for this are:
Figure: Accessing Scheduled Tasks via CLI
Useful third-party tasks
In addition to the useful tasks that Joomla already provides, there are of course also third-party extensions that do a great job. These include:
Automatic initiation of backups ( Akeeba Backup ).
A task scheduler plugin to automatically reset post views.
A task scheduler plugin for moving posts according to a calendar field (custom field) – for example, upcoming events can be moved to the expired events category.
Take out the trash: Is your trash can getting full? With this plugin you can automatically put it in front of your door.
Manage users – this task helps you deal with inactive users.
Extension Update : This plugin checks for extension updates available and sends an email if so.
Even though Task Scheduler has been around for some time, you won't find too many official task plugins. However, the number is expected to grow.
Programming your own tasks
What is particularly interesting is the possibility of programming individual plugins to solve specific tasks. To do this, you have to create a classic Joomla plugin for the Task group with the following code:
<?php
defined('_JEXEC') or die;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Component\Scheduler\Administrator\Event\ExecuteTaskEvent;
use Joomla\Component\Scheduler\Administrator\Task\Status;
use Joomla\Component\Scheduler\Administrator\Task\Task;
use Joomla\Component\Scheduler\Administrator\Traits\TaskPluginTrait;
use Joomla\Event\SubscriberInterface;
/* diese Datei kommt in die Dateistruktur beispieltask/src/Extension in ein Joomla task plugin */
class PlgTaskBeispieltask extends CMSPlugin implements SubscriberInterface
{
use TaskPluginTrait;
protected const TASKS_MAP = [
'beispiel_task_id' => [
'langConstPrefix' => 'PLG_TASK_BEISPIEL_TASK',
'method' => 'beispielTask',
'form' => 'beispiel_form',
],
];
protected $autoloadLanguage = true;
public static function getSubscribedEvents(): array
{
return [
'onTaskOptionsList' => 'advertiseRoutines',
'onExecuteTask' => 'standardRoutineHandler',
'onContentPrepareForm' => 'enhanceTaskItemForm',
];
}
private function beispielTask(ExecuteTaskEvent $event): int
{
// Code für die Aufgabe hier einfügen
return Status::OK;
}
}
view rawbeispieltask.php hosted with ❤ by GitHub
Here are some ideas for your own task plugins:
Content synchronization: You can synchronize content between different areas of your website or from other websites.
Automatic image optimization : Regularly compresses and optimizes all new images on your website for better loading times. Joomla already includes this in a basic version, but can still be customized to your own needs.
SEO Checker : Regularly check your site for SEO criteria and send a report with suggestions for improvement.
Social Media Posts : Automatically shares new posts on various social media platforms.
Price Monitoring : Monitors competitor prices and adjusts your own prices accordingly (for e-commerce sites).
Privacy Compliance Checker : Regularly checks your website for compliance with privacy policies and reports potential issues.
Automation tasks: For example, in conjunction with platforms such as Make or Zapier , which allow you to connect different apps and services and create automated workflows. Make and Zapier help to automate repetitive tasks without the need for manual intervention. For example, you can synchronize new users or automate social media posts.
Conclusion: The Task Scheduler in Joomla
With these ideas and Joomla's powerful Task Scheduler, you can take your website to a new level of automation and efficiency. Experiment with the existing plugins and think about which individual tasks could make your everyday life easier. The Task Scheduler is an underrated tool - use its power!
And in the Web Cron tab you can also generate a
-
- Posts: 477
- Joined: Thu Jan 02, 2025 7:23 am