Just an FYI that this is a topic we're planning on addressing in the next version of the EJB spec (EJB 3.1 -- JSR 318) by adding support for calendar-based time expressions and automatically created timers. The use-case you mentioned will be doable with something that looks like this :
@Stateless
public class TaskBean {
@Schedule(hour="20")
public void doTask(Timer t) {
...
}
}
The timer will be created automatically as a result of deployment, so there would be no need to programmatically create it within a servlet init callback. We'll also be supporting the packaging of EJB components directly within a .war(without the need for an ejb-jar), so it won't be an issue to take advantage of this from your web application.
[Message sent by forum member 'ksak' (ksak)]
http://forums.java.net/jive/thread.jspa?messageID=254207