Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 at 11:53
I already tried that but nothing happening with that option. It still remains open. – user1449596 Jan 3 '14 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 '14 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 '14 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 '14 at 13:44

You must log in to answer this question.

Browse other questions tagged .