We are facing the same problem. When we process the task, then we check
for next planned execution time, Then we "sleep" for specified time.
Process, and again.
If task is running over next planned execution time, then this time is
skipped.
Jan
Mikolaj Rydzewski wrote:
Hello,
I have some kind of a task scheduler in my webapp. It's made of MBean
Timer object, it fires its events overy 2 minutes and it works well.
I know - it it works don't fix it ;-)
But I want to turn it into something like cron. There are two projects
I'm aware of: jcrontab at sourceforge and quartz at opensymphony.
Isn't it true, that spawning user defined threads is not recommended
thing in servlet/j2ee applications? Both those projects use custom
threads to run schedulers and tasks.
I would like to stay with MBean solution. But what happens when I
increase frequency of events and processing time of events? I.e. app
server will fire events every 15 seconds and some events would take a
minute to complete? I don't want to have three other events waiting in
a queue, I would like to receive them at exact time they fired (well,
in a separate thread?).
What way should I go?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]