Skip to content

Instantly share code, notes, and snippets.

@jwlyn
Created June 3, 2015 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwlyn/e544489965f053b806a0 to your computer and use it in GitHub Desktop.
Save jwlyn/e544489965f053b806a0 to your computer and use it in GitHub Desktop.
在单机上定时执行任务
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
<task:annotation-driven /> <!-- 定时器开关-->
<bean id="myTask" class="com.pkg.SomeTask">
<property name="xx" value="xx"/>
</bean>
<task:scheduled-tasks>
<task:scheduled ref="myTask" method="jobMethod" cron="* */25 * * * ?"/>
</task:scheduled-tasks>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment