Spring scheduled tasks

Posted by stackuser on Stack Overflow See other posts from Stack Overflow or by stackuser
Published on 2014-08-20T22:08:46Z Indexed on 2014/08/20 22:20 UTC
Read the original article Hit count: 273

Filed under:
|
|

I'm trying to use spring scheduled tasks for my scheduled jobs, I have one scheduler configured for multiple tasks executors as below

<task:scheduled-tasks scheduler="ABCTaskScheduler">
    <task:scheduled ref="ABCTaskExecutor" method="execute"
            cron="some_expression_1" />     
    <task:scheduled ref="DEFTaskExecutor" method="execute"
            cron="some_expression_1" /> 
</task:scheduled-tasks>

My question in how can I make the task executor list dynamic, so that I do not have to change my spring config each time I have to add a new task executor.

© Stack Overflow or respective owner

Related posts about spring

Related posts about task