Announcement Announcement Module
Collapse
No announcement yet.
access programmed tasks (triggers) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • access programmed tasks (triggers)

    Hi,
    I need to know in my web application, which are the programmed task that will be run in the future.
    It would be great if I also could see which one has already been fired.

    I'm using the taskScheduler:

    <task:scheduler id="erpScheduler" pool-size="10" />
    <task:scheduled-tasks scheduler="erpScheduler">
    <task:scheduled ref="clienteBatchTaskServiceImpl" method="recalculaClientesEdadesSexoPorCentro" cron="0 0 0 * * *" />
    </task:scheduled-tasks>

    Then, in a controller I use:
    @Autowired ThreadPoolTaskScheduler scheduler;

    but from the scheduler I cannot access a list of triggers o programmed task. Not even from the scheduledExecutor (scheduler.getScheduledExecutor()).

    I've seen, that, during the app initialization, a bean of class ScheduledTaskRegistrar is instantiated. However I cannot get access to it using @Autowired. And even thouht I could have access to it, there is no getter method to reach the triggerTasks, cronTasks, fixedRatedTasks, etc.

    I know that with Quartz this is possible. So, is this done with the Spring scheduler paradigm?

    Thank you very much
Working...
X