开发者

schedule java program

I want to run my java program in regular interval , lets say, in every 3 hours. I am thinking to write a .bat file and put command to call java class. But what is the best way to run .bat regularly in w开发者_Python百科indows xp. Thanks in advance. I dont want to use third party tool.


Windows scheduled tasks are built for exactly that purpose.

You can run things on multiple schedules (so you can get your every-three-hour behaviour) and you can get your code to run whether or not logged in.

The multiple scheduling is a bit tricky. You basically set it up as a daily task to start with but, near the end, it will ask you if you want to do advanced features.

Select yes then you can set up multiple schedules at that point.


If you want a pure Java Based solution you can try QUARTZ SCHEDULER. But as paxdiablo already mentioned, Windows Task Scheduler will do that as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜