I'd like advice regarding scheduling execution within a Java web application. (currently running on Tomcat, but I'd like to avoid anything tomcat-specific).
I think the following defines the aspect of my problem I'm interested in.
Consider an application that polls a set of files for updates periodically. I'd like to provide a user interface that allows a user to define the polling interval for a given file independently, and have the execution schedule update according to user input.
How can I achieve this safely in a web app?