Hi, On Tue, Jun 19, 2018 at 4:35 PM Josh Spiegel <[email protected]> wrote: > > Hi, > > I am using Jetty and I would like to create a background task that > periodically wakes up and checks on some cached state, possibly doing some > cleanup. I see several ways to do this but I am not sure what the best > practice is. One idea is to use Jetty's scheduler service (i.e. schedule the > task to wake up and have it continuously reschedule itself when it is done). > Does anybody know if this is a reasonable approach?
Yes it is. It has the added benefit that its lifecycle will be bound to that of Jetty and you don't have to write shutdown code for your own thread. -- Simone Bordet ---- http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. _______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
