Windows scheduled Task - Stopping Console w/ error & Re-starting the service

2

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.

user42639

Posted 2010-07-12T13:54:57.790

Reputation: 121

Answers

0

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.

boot13

Posted 2010-07-12T13:54:57.790

Reputation: 5 551

0

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.

JNK

Posted 2010-07-12T13:54:57.790

Reputation: 7 642