I try to run many scheduled-tasks in parallel with one instance every one I configure task like this
<task:scheduled ref="PatchData" method="start" fixed-rate="1000"/>
but there are many instances started every second while the first not finished. Is it possible to configure only one instance of the task run in same time ? My beans configuration in spring-scheduler.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.2.xsd">
<bean id="UpdateScheduler" class="org.ws.scheduled.UpdateScheduler" />
<bean id="PatchData" class="org.ws.scheduled.PatchData" />
<task:scheduled-tasks scheduler="myScheduler">
<task:scheduled ref="UpdateScheduler" method="start" cron="0 30 14 * * *"/>
<task:scheduled ref="PatchData" method="start" fixed-rate="1000"/>
</task:scheduled-tasks>
<task:scheduler id="scheduler" pool-size="10"/>
fixed-delayinstead offixed-rate. - M. Deinum