One useful trick lets you create a scheduler (cron daemon) in your web application as a part of the application itself. So you can implement for example a pure JSP cron daemon.
What if your web application requires some periodical process? It is good when your hosting provides some kind of cron tab scheduler, lets you invoke your own application, but to be honest it is not widely used option. Here we are describing one trick lets you deploy the scheduler (well – pseudo scheduler) right in your web application.
The idea is very simply. You can "borrow" requests from the visitors of your site. Of course, it assumes that your site consistently get visitors at a frequency greater than your scheduler’s interval. You can add to your site a hidden (invisible) iframe where src attribute points to the "scheduler". And your "scheduler" will perform the requests to your periodical tasks (implemented as JSP pages or servlets).
So you can add to your site some hidden frame:
<iframe style="display:none" src="my_scheduler.jsp"></iframe>
Here my_scheduler.jsp implements your pseudo scheduler. For the above mentioned
approach (return the code for Ajax request to the real task) you can deploy
from Coldtags suite. So your pseudo scheduler
can simply deploy this taglib:
<%@ taglib uri="taglib.tld" prefix="f" %>
And by the way the approach could be used as is by the Coldfusion developers too.
See also for Java web components: