Forums Register Login

monthly thread Scheduling

+Pie Number of slices to send: Send
hello to all.

i need to generate monthly report ..

every first day of the month ..the report has to be generated..taking a records from the date base ...(by taking from and to date)

can anyone help me ....how to Schedule..for a .. month...

Thanks to all...
+Pie Number of slices to send: Send
Assuming you have a JVM that will be up all the time, say an app server that never restarts: compute the next time the report should run, compute the milliseconds between then and now, make a Java Timer that will wait that long and then execute and compute a new next time.

Because JVMs don't stay up forever, you probably need to persist the "next scheduled run" in a file or database or whatever. At JVM startup, read the stored time and set up the Timer.

Or invest a little time in learning Quartz which does all this and more.

Any of that seem to work for your problem?
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 653 times.
Similar Threads
Date Format
Best Solution for Presenting Data
If one has to develop a servlet/jsp appln. from scratch... :-)
recurrence booking system
Please help me format my date for Oracle/SQL
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 21:37:59.