Hello,Everyone.i want to delete trashan every 30 minute using trashcan cron.i pasted that in alfresco.properties file:
trashcan-cleaner.cron=0 0/30 * * * ?
trashcan cron is starting.but no files in trash can be deleted.alfresco.log record in alfresco.log:
2018-08-19 22:56:00,051 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-2] Running TrashcanCleaner
2018-08-19 22:56:00,082 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-2] Found 11 nodes on trashcan
2018-08-19 22:56:00,082 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-2] Number of nodes to delete: 0
2018-08-19 22:56:00,082 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-2] Nodes deleted
2018-08-19 22:56:00,082 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-2] TrashcanCleaner finished
number of deletes is 0.but it found 11 nodes on trashan.why these nodes are not being deleted? How can I solve this problem?
Hi,
The nodes might not be getting deleted as they dont pass the criteria of daysToKeep parameter.
You can configure this param to tell cleaner about number of days deleted docs to be kept in trash can. For e.g. if you configure it as 7, it will remove content from the trashcan and mark them as orphan if a content has been in the trashcan for more than 7 days.
To delete from the trashcan without waiting any grace period set the trashcan.daysToKeep property value to -1.
Hope this helps!!!
I added this criteria in alfresco global properties.trashcan cron is starting.but no files in trash can be deleted again .
added criteria in alfresco-global.properties file
trashcan-cleaner.cron=0 0/4 * * * ?
trashcan.daysToKeep=-1
log record in alfresco.log
2018-08-21 16:24:00,107 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-4] Running TrashcanCleaner
2018-08-21 16:24:00,155 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-4] Found 11 nodes on trashcan
2018-08-21 16:24:00,156 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-4] Number of nodes to delete: 0
2018-08-21 16:24:00,156 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-4] Nodes deleted
2018-08-21 16:24:00,159 DEBUG [org.alfresco.trashcan.TrashcanCleaner] [DefaultScheduler_Worker-4] TrashcanCleaner finished
trashcan-cleaner.keepPeriod : Specifies the period for which trashcan items are kept (in the java.time.Duration format).
You can try P-1D OR -P1D. Is this doesn't work, you need to do some research for specifying in duration format.
Thanks,i tried -P1D. this criterion works fine.
Hi there,
I tried the same thing in galfresco-global.properties
trashcan-cleaner.cron=0 0/5 * * * ?
trashcan-cleaner.keepPeriod=P1D
trashcan-cleaner.deleteBatchCount=1000
with my dockerized Alfresco 6
but nothing happens the cron doesn't fire
can you help ??
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.