aspose file tools*
The moose likes Spring and the fly likes How to implement dynamic scheduling(cron job/trigger) in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to implement dynamic scheduling(cron job/trigger) in Spring" Watch "How to implement dynamic scheduling(cron job/trigger) in Spring" New topic
Author

How to implement dynamic scheduling(cron job/trigger) in Spring

Shahid Pathan
Greenhorn

Joined: Dec 28, 2010
Posts: 23
I have a requirement to implement the dynamic corn job for sending SMS as per the provided the date and time. I am using spring3
Following is are the classes to collect the input and store in data base.


Now I want to implement the Scheduling job in Spring. I am going through the spring document and trying to implement those scenario.
If mean while if any one suggest me better approach and pointer to go ahead that will be great help.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

There are two ways. One with xml using the <task> namespace and one with Annotation using @Scheduled on the method. Both take CRON strings for setting when to schedule them

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to implement dynamic scheduling(cron job/trigger) in Spring