开发者

execute .jar file on windows server with shell script from linux

I have application packaged into .jar file on windows server. I want this application to run every 3 seconds. how can I achieve this?

I was planning to write shell script on linux server, remotely log into windows server an开发者_StackOverflowd execute .jar file but the problem is windows server and linux server are on different VLANs which have been prevented from communicating. so i couldn't even test if my silution is working.

your urgent help please. this has to be delivered before end of business tomorrow


Windows should have an scheduler, doesn´t it??

Whatever, you can add a code in your jar to make it execute what you want evey 3 secods. You can do in about 2 lines. Timer timer = new Timer(); timer.scheduleAtFixedRate(new MyTimer(), 3000, 3000); and let it running... the MyTimer class has to extend TimerTask (and implement run method). Put the stuff u want your program to do in the run method. It could also start the other jar file you want

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜