title: Schedule-based execution in a J2EE Web Application
body: <p>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).</p>
  
  <p>I think the following defines the aspect of my problem I'm interested in.</p>
  
  <p>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.</p>
  
  <p>How can I achieve this safely in a web app?</p>