Spring task can easily realize the function of timed tasks, which is more convenient to use than Spring+quartz.
The main thing about Spring task is the XML configuration, which can also be implemented by annotations:
<bean id= "Tasktest" class= "tasktest"/><task:scheduled-tasks> task:scheduled ref= "taskTest" method= "test "cron=" 0 * * * *? "/></task:scheduled-tasks>
need to add the appropriate schema
xmlns:task= "xsi:schemalocation=" Http://www.springframework.org/schema/task http://www.springframework.org/ Schema/task/spring-task-3.0.xsd "
The corresponding Java bean:
public class Tasktest {public void Test () {System.out.println ("Test");}}
Cron Express configuration is the same as quartz:
at least 6 (or possibly 7) time elements with spaces separated
* * * * * * * * from left to right: seconds, minutes, hours, days, months, weeks, years ?
Spring Task timed Task