------解决方案-------------------- 在java里面,schedule(TimerTask task, Date firstTime, long period) 这个函数你用对了么
可以参看下这个帖子http://blog.csdn.net/yanmei_yao/article/details/8131282 ------解决方案--------------------
Could you tell me where your time configuration is placed? If you put time configuration in some file instead of memory, when you update this file,you have to restart your tomcat to make it effective unless your program can automatically load the latest content of that file. ------解决方案-------------------- If your program always reads directly the configuration file every time rather than read once to memory,the scenario I mentioned just now is nonexistent. ------解决方案-------------------- timer.schedule(timerTask, 1*60*1000, 10*60*1000);
之前自己写的一个定时器 用在tomcat 启动后 一分钟后 自动获取数据的。
所有的奥秘都在这一个函数中! ------解决方案-------------------- 重点就在于你配置的时间属性是不是实时去读取的 ------解决方案--------------------