要求每5秒钟执行一次,在线等!
------解决思路----------------------
<schedule>
<job>
<name>NewsStats</name>
<group>Group1</group>
<description>NewsStats</description>
<job-class>com.webfin.common.schedule.NewsStatsTask</job-class>
</job>
<trigger>
<cron>
<name>NewsStats</name>
<job-name>NewsStats</job-name>
<job-group>Group1</job-group>
<!-- It will run every 2 seconds -->
<cron-expression>5 * * * * ?</cron-expression>
</cron>
</trigger>
</schedule>
------解决思路----------------------
<cron-expression>0/5 * * * * ?</cron-expression>