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.

How can I go by setting up a scheduled task that will cancel a java console that outputs a heap error and then start it up again?

I need to restart my wowza service because of some java heap allocating memory error that seems to happen every night.

I tried few options but could not get it right.

share|improve this question

2 Answers 2

If it's an actual service, you can also do a

net stop <name of service>

or

net start <name of service>

PSkill is a great tool too.

share|improve this answer

You can find any number of tools to kill processes, like pskill from sysinternals/Microsoft. Write a batch file that kills the process, waits until it's gone, then restarts it. Once that's working, create a new scheduled task that runs it at a set time, making sure it fires after the heap error is certain to have occurred. The trick will be to identify the process to kill. Ref: http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.