The task plugin offers the possibility to run some background tasks through the core joomla task scheduler.
More information about the task scheduler can be found in the official Joomla magazine.
The media sync task offers the possibility to sync two folders from different adapters. The source folder is the folder where the files should be synced from while the destination folder is where the files should be synced to. If the delete flag is turned on, then destination files are deleted during the sync which do not exist on the source location.
The select button allows to browse the media manager and select a folder within any adapter. The source and destination folder options must be full path names with the plugin name, adapter id and folder names/ids. They must match the scheme:
{plugin name}-{adapter name}:/{folder tree}
The local media sync offers the possibility to sync media files, which are served as local files, from the cloud service for specific adapters or all. This means, when a publisher picked an image from a remote adapter like Google drive or Dropbox and local images is enabled, then the file is copied to the Joomla webserver and served from there in the article.
When the file changes on the cloud service, then the Joomla server gets no notification about the update. This task can be used to refetch the changed remote files, so they contain the new content from the cloud service.
More information about local files can be found in the Concept of image service provider integration article or the respective cloud service adapter.
The DPMedia scheduler tasks can become long running. So it is obvious that they should not run in a browser page request as they very likely have a limit of 30 seconds or so. This will then abort tha execution of the tasks. It is very much recommended to run the scheduler as a cron job, which syncs the media completely in the background. Like that the visitor will never suffer from media sync during a page load.
The following line can be copied into the crontab file to set up a scheduler cron job. It will run the scheduler every minute, as the time management is done within the Joomla scheduler it is safe to execute the cron job every minute.
* * * * * /{my-path-php-executable}/php /{{joomla-root}}/cli/joomla.php scheduler:run
Comments (0)