In my Java Spring web application, this is what worked for me:
cron="0 0/30 * * * ?"
This will trigger on for example 10:00 AM, then 10:30 AM etc.
Here is a full configuration file:
<?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:beans="http://www.springframework.org/schema/beans"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task.xsd">
<beans profile="cron">
<bean id="executorService" class="java.util.concurrent.Executors" factory-method="newFixedThreadPool">
<beans:constructor-arg value="5" />
</bean>
<task:executor id="threadPoolTaskExecutor" pool-size="5" />
<task:annotation-driven executor="executorService" />
<beans:bean id="expireCronJob" class="com.cron.ExpireCron"/>
<task:scheduler id="serverScheduler" pool-size="5"/>
<task:scheduled-tasks scheduler="serverScheduler">
<!-- every thirty minutes -->
<task:scheduled ref="expireCronJob" method="runTask" cron="0 0/30 * * * ?"/>
</task:scheduled-tasks>
</beans>
</beans>
I dont know why but this is working on my local develop and production, but other changes if I made I have to be careful, because it may work local and on develop, but not on production.