cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled action - How to execute a Java code instead of JS

sergio
Champ in-the-making
Champ in-the-making
Hi all.

I am investigating about the possibility of defining scheduled actions but all the examples focus this capability only throughout the org.alfresco.repo.action.scheduled.SimpleTemplateActionDefinition bean.

My question is: suppose I have a custom Java bean already injected into Alfresco at bootstrap, I would like to call a specific method in a scheduled way. Is it possible?

If not, is it possibile to call in a scheduled way a Java bean class constructor? In other words, I want a Java class called Cleaner.java could be instantiated, executed (the code inside its constructor) and destroyed in a scheduled way. Is it possible?

Many thanks to all.

All the best,

Sergio
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

Yes, you can use all the scheduling available in Spring. We have a few helper classes but there is nothing to stop you wiring up scehduled jobs.

Andy

sergio
Champ in-the-making
Champ in-the-making
Are you available for replying to http://forums.alfresco.com/viewtopic.php?p=26573#26573?

It is a strictly related problem.

Many thanks Andy.