AnsweredAssumed Answered

How to delete node thru cron?

Question asked by maqsood on Nov 3, 2010
Hi All

I want to delete documents from repository by accessing a custom property value of the document, using cron job. Have gone thru this http://wiki.alfresco.com/wiki/Scheduled_Actions where it is mentioned more examples are in scheduled-action-services-context.xml.sample and also browsing forums i came to know there is a job for cleaning up nodes in shceduled-jobs-context.xml.

My questions are
1. Is alfresco by default runs any cron job?
2. Do i need to remove '.sample' from this file <alfresco>/tomcat/shared/classes/alfresco/extension/scheduled-action-services-context.xml.sample to run any default cron job?
3. Can i use nodeServiceCleanupJobDetail and nodeServiceCleanupTrigger beans from shceduled-jobs-context.xml to achieve my task? if yes,
4. How can i give condition to check the custom property value in bean?
5. How do i invoke this cron job in alfresco?

I haven't configure/run cron before, so would like to know detail steps to achieve the task.

Help is greatly appreciated !!

Thanks in advance.

Outcomes