.. _scheduler-task: ============== Scheduler Task ============== To keep the configured accounts up to date, you can set up `Scheduler Tasks `__. Available Tasks =============== The following tasks are available to you: * ``fp_social:synchronize``: Synchronizes the created accounts if they are selected for automatic synchronization. * ``amount`` (optional): Number of social networks to synchronize. A value of ``0`` means no limit. * ``fp_social:download``: Downloads all post images that have not yet been downloaded. Otherwise this happens when the respective post is displayed for the first time. * ``amount`` (optional): Number of images to download. If no value is given, up to ``40`` images are downloaded. * ``fp_social:remove``: Deletes old posts that are older than the specified number of days and are not currently in use. Images that are no longer referenced (including the associated files) and hashtags are also removed in the process. * ``days`` (required): Number of days after which posts are deleted. * ``fp_social:removeduplicates``: Removes posts that were imported a second time while they were hidden. Of every post that exists more than once for the same network and post id, the oldest record is kept -- that is the one carrying the decision of the editor -- and the copies are deleted together with their post links, images and hashtags that are then unused. * ``--force`` (optional): Apply the changes. Without it the command only reports what it would do and changes nothing. .. note:: ``fp_social:removeduplicates`` is a one-time cleanup, not a recurring task. It repairs data that was created before version 17.7.2, so run it once after the update. Running it before the update has no lasting effect, because the next synchronization would create the copies again. .. note:: If the social server has reached a request limit, ``fp_social:synchronize`` reports the affected account as ``Synchronization deferred`` and carries on with the next one. The run does not fail, and the account is picked up again once the block has passed. See :ref:`rate-limit`. Setting up a Task ================= #. Switch to the **Scheduler** module. #. Click the button to add a new task. #. Fill in the fields as follows: * **Class:** Execute console commands * **Frequency:** We recommend ``*/15 * * * *`` here. This means that the task is executed every 15 minutes. * **CommandController Command:** Select one of the tasks listed above here. #. Save the task and check it by running it manually once. .. warning:: Make sure that you call the Scheduler. Please also note that the task can only run as often as the Scheduler is called. If the Scheduler is only called every 30 minutes, the tasks will likewise only run every 30 minutes, regardless of their setting under *Frequency*. For more information about the Scheduler, see the `official documentation `__.