Autonomous code

Here is an interesting question that I have not found an answer yet. What is the best way to have a piece of code running in an application server environment be autonomous? For instance, a piece of code that would wake up every night at midnight to do some background processing, etc. Obviously it would be possible to write this code externally to the app server and run it under cron, etc. But I was wondering if anyone had set up anything to execute within the server to handle this type of need?

Marcus

[527 byte] By [mzarra] at [2007-9-30 15:24:45]
# 1
Have a look to the ejb spec 2.1.. It's a features that has to be supported by the application server and s18as does. In any case Bea already provided functionalities of timing. I have seen around several solution where timing has been implemented.Hope this helps.
ROCLI at 2007-7-5 22:30:21 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Thank you, that does help some. Of course it leads to the next question, does anyone know of a way to have a bean auto-start upon deployment? Even just auto-loading would probably be sufficient since I could trigger a timer from the create.Thanks again for the help.
mzarra at 2007-7-5 22:30:21 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...