EJB2.1 规范中提出了 TIMER SERVICE ,但目前的应用服务器中还没支持 嘿嘿 你就等把
写个简单的javabean也能实现
public class EmailScan
{
public EmailScan()
{
}
public static void main(String args[])
{
java.util.Timer time = new java.util.Timer();
time.schedule(new RemindTask(args[0]) , 0, RunTimePeriod);
}
}
class RemindTask extends java.util.TimerTask
{
private String _arg="";
RemindTask(String arg)
{
this._arg=arg;
}
public void run()
{
new EmailScan();
}
}