Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We have a batch file which runs continuously in our windows 2003 server because a Java application is depending upon that.

However, now I wish to close it automatically for half an hour every day at night when we scheduled for automatic backup from the java application.

Can you advise how I can do that? It could be from another batch file or any other way.

share|improve this question
    
Do you run it using Windows Task Scheduler? Could you set the task to force it to quit after running for 23 hours 30 minutes? (Using the "Stop the task if it runs for..." setting) –  Andi Mohr Jan 3 at 11:53
    
I already tried that but nothing happening with that option. It still remains open. –  user1449596 Jan 3 at 11:55
    
Hmmm, strange. That's never failed me before... have you tried using TASKKILL in a separate batch file? –  Andi Mohr Jan 3 at 12:04
    
If it works for you, what do you think I did wrong with the option? As far as I know, we can kill only .exe with taskkill option, not .bat running file. I already tried to kill cmd.exe with taskkill but that also didn't work out well. –  user1449596 Jan 3 at 13:01
    
I'm afraid I can't think of anything that would cause the "Stop the task..." function to fail. And good point on taskkill. Better minds than mine may be required! –  Andi Mohr Jan 3 at 13:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.