Running Tasks Automatically and periodically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 04:05 AM
I have a question and hope that someone can help us here. We know that when a node is deleted in Alfresco, it remains in a temporary "space" so it can be recovered if needed, or another cause could be if it has been deleted by mistake.
After 3 months using Alfresco we have now 4 GB in that temporary space. Is there any way to configure Alfresco so this space is cleaned out once a week, so it does not affect the Backup processes. I mean we assume that when we run a backup, these space is also backed up, which is consuming disk space that we need.
Any ideas of how we can configure this to delete this "removed" nodes once a week at a specific time, or the only way is manually?
Thanks a lot in advane
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2009 12:02 PM
So… non has thought about this situation before? did anybody got this solved with any "periodic" rule or something?… Any ideas will be very welcome!!
Cheers


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2009 01:17 PM
If you want to do it from inside Alfresco, I can think of two ways of doing it:
1) Web Scripts that can be run using your favorite scheduler (e.g. cron) via a REST interface.
2) Using a jBPM timer + custom advanced workflow to run a javascript task/action that does what you want.
It is simpler to use web scripts although using a jBPM timer is safer and not that difficult to do.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2009 01:20 PM
Thanks for the help… gonna check how this can be implemented and try it
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2009 02:46 PM
http://wiki.alfresco.com/wiki/Content_Store_Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2009 02:55 AM
contentstore.deleted (C:\Alfresco\alf_data\contentstore.deleted)so what I must do is configuring the OS to delete the files withing the folder
contentstore.deleted
Basically the timings could be
a) Configure the "contentStoreCleaner" so all files deleted and older than 7 days get deleted and moved the "deletedContentStore"
b) Run the backup of the application
c) set up the OS to run a script to delete the files within C:\Alfresco\alf_data\contentstore.deleted
And after that if I log in the application and go to the "Manage Deleted Content" screen I should only see items deleted in the last 7 days
is it correct the way I am understanding it?…. anything missing from my side?
Thanks once more

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2009 12:36 PM
Anyone can confirm that my understanding is the right one? Dont wanna start deleting folders in Alfresco and lose everything 🙂
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 10:53 AM
I would opt for a workflow timer, so starting a workflow that is going to run permanently, including a timer task that does find all files older than 7 days via Lucene.
If you alter your workflow you can just stop it from the workflow console or via the tasks done dashlet in My Alfresco and redeploy your new workflow definition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2009 02:30 AM
Thanks a lot, that sounds reasonable
Cheers and thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2009 05:01 AM
We are trying to set up a Scheduler Task to remove from the system all the "deleted items" that are still kept in Alfresco after you delete them from their spaces. So we are trying to set it up to access the space where these items are stored and remove them forever. We would like to set it up to be run automatically once a week. The way we did it seems it works, looks for the items with aspect "Archived" and removes them.
Our question is ¿Are we sure these "Archived" aspect is the one that points "ONLY" to the deleted items? ¿Do you know if just searching by this aspect I would get any other item I do not want to delete? ¿Any other alternative to make this task automatic?
Here is the action scheduler we have created
<bean id="programDeleteTrash" class="org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinition"> <property name="transactionMode"> <value>UNTIL_FIRST_FAILURE</value> </property> <property name="compensatingActionMode"> <value>IGNORE</value> </property> <property name="searchService"> <ref bean="SearchService"/> </property> <property name="templateService"> <ref bean="TemplateService"/> </property> <property name="queryLanguage"> <value>lucene</value> </property> <property name="stores"> <list> <value>archive://SpacesStore</value> </list> </property> <!– Find all nodes that do not have the aspect –> <property name="queryTemplate"> <value>+ASPECT:"{http://www.alfresco.org/model/system/1.0}archived"</value> </property> <property name="cronExpression"> <value>0 0 14 ? * SAT</value> </property> <property name="jobName"> <value>jobB</value> </property> <property name="jobGroup"> <value>jobGroupB</value> </property> <property name="triggerName"> <value>triggerB</value> </property> <property name="triggerGroup"> <value>triggerGroupB</value> </property> <!– Inject the scheduler - the trigger will be registered with this scheduler –> <property name="scheduler"> <ref bean="schedulerFactory"/> </property> <property name="actionService"> <ref bean="ActionService"/> </property> <property name="templateActionModelFactory"> <ref bean="templateActionModelFactory"/> </property> <property name="templateActionDefinition"> <ref bean="deleteTrashActionScheduled"/> </property> <property name="transactionService"> <ref bean="TransactionService"/> </property> <property name="runAsUser"> <value>admin</value> </property> </bean>
