This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line! See this thread for details.
hi i'm working in a spring mvc project and i using quartz to schedule a task that send a email between a start date and end date with some frequency defined by the user in the user interface, i was thinking on doing a mtehod with the start date, end date and frequency as a parameter and call this method from a controller when the user click the button send email, then i want to create a table in my database that save that task with a unique id and another field that says if this task is active or not, if there is a crash in my application, when i restarted my web application is going to do a query in my Task table and bring me all my task that are active and return this tasks then i will save them in an arrraylist and then execute them. I want to know if this is a good aproach to do this requeriment thanks in advance
Quartz can persist the jobs in the database, with this Quartz is going to handle the misfires, application restarts and allows you to have control like pause and resume the jobs also.
posted 5 years ago
Prasad Krishnegowda wrote:Quartz can persist the jobs in the database, with this Quartz is going to handle the misfires, application restarts and allows you to have control like pause and resume the jobs also.
i'm using oracle 11g to do my application, but what do you mean that quartz does it? do you mean that i dont need to create tables to do this?? i was thinking of this approach since the users need a list of all the scheduled emails that they created, but is my approach ok??
You can very well create the tables to store the data and show the user list of scheduled emails.
What i meant was, when the application restarts there is no need for you to query these jobs again from the table and re-execute them, quartz has persistent jobs feature, where quartz can automatically pickup the jobs which were running before the application stopped and continue executing them on regular intervals as before. In this aproach, quartz requires to have few tables created, the schemas and the approach are available on the quartz site, so i would suggest you look at that feature once.
posted 5 years ago
is there anyway to keep track of my jobs running in quartz without having to do a query in the table i created to save them?