0

Is there a way to determine when the Sitecore cache Clean Up Agent runs? Also, can somoene provide instructions on how to enable the Sitecore Clean Up Agent. Sitecore does not provide instructions. Thanks in advance,

1
  • are you referring this task: Sitecore.Tasks.CleanupAgent ? Sep 7, 2018 at 12:21

2 Answers 2

3

Is there a way to determine when the Sitecore cache Clean Up Agent runs?

You can know if the batch has ran by checking if the entries Scheduling.CleanupAgent started. FileCleaner count: and Scheduling.CleanupAgent done are in the logs.

Note that you need to make sure that you have the logging level as INFO

You may also have the entry Exception in Scheduling.CleanupAgent. Folder: if there are any errors.

Also, can somoene provide instructions on how to enable the Sitecore Clean Up

  • First, check the showconfig.aspx page (http://[domain]/sitecore/admin/showconfig.aspx) and search for agent type="Sitecore.Tasks.CleanupAgent".

  • Check the interval if it is not set to 00:00:00. 00:00:00 means the agent is disabled.

  • To configure it, change the interval. Default is every 6 hours.

As @Jay S mentioned in his answer, you can have more information about different errors at Sitecore Knowlegde Base

2
  • Thanks Hishaam. Here is the clean up agent interval: <agent type="Sitecore.Tasks.CleanupAgent" method="Run" interval="00:30:00"> As no errors are reported in the log, does this mean it's running? The deletion of files is not occurring so I trusted it wasn't running. I have an item to delete JSON files every 1 day. <remove folder="/App_Data/MediaCache" pattern=".json" maxAge="01.00:00:00" recursive="true" /> <remove folder="/App_Data/MediaCache" pattern=".*" maxAge="90.00:00:00" recursive="true" />
    – Chives
    Sep 10, 2018 at 11:23
  • If you have logging level as INFO, do you see the entries Scheduling.CleanupAgent started? Sep 10, 2018 at 11:32
2

You may wish to look for errors in the logs to see if there are any issues when the agent is running. The most typical issue would be permissions to remove the file on the system. Default should be 6 hours interval, if you have not disabled the agent. This KB article has details:

https://kb.sitecore.net/articles/113648

1
  • thanks for the input. i checked the logs. no errors are being thrown. I'm thinking the pattern .json is not acceptable in Sitecore and only *. pattern can be used.
    – Chives
    Sep 20, 2018 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.