This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes How to pass values to spring schedular at run time? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to pass values to spring schedular at run time?" Watch "How to pass values to spring schedular at run time?" New topic
Author

How to pass values to spring schedular at run time?

Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
I am using spring scheduling example as shown below.



In above example the startDelay and repeatInterval is hardcoded in .xml file.
But my requirement is to pass these values at rune time.
Because these values are comming from web GUI used by Client.

Please help me.

Thanks
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
What kind of task you want to schedule in the scheduler? I guess it is possible to read the value from property file instead of hard coding into XML file. 'Start time' and 'Repeat time' is read at that time of server startup so later on even if you change any of those values you got to restart the server to see the effect.

Generally, Scheduler is used to create a daemon process which will run forever until you stop the server. For example, it can be used to send the emails to all the ranchers who have put watch on some topic.

Hope it helps you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass values to spring schedular at run time?
 
Similar Threads
Using Spring and Quartz
no bean named 'crontrigger' is defined
Spring with Quartz
Quartz job stoping after some time
Please explain the logic