• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

task to restart process once a week?

hoppa

Senior member
I want to have a script run once a week on my server to stop a process (Winamp Orb, which has massive memory leaks) and then restart it. I figure I'll put a batch file in scheduled tasks, that much is fine.

What would I put in the batch file though? Is it possible to actually exit the program rather than just killing the process?

Thanks for any help.
 
I don't know anything about that app, but for a service just use
net stop servicename
net start servicename

you could break that up into two separate batch files and set the stop to run and a couple of minutes later run the start batch.
 
You can use taskkill.exe in a batch file to stop the process then use the start command to start it again. Taskkill.exe tries a graceful kill of the app, telling it to end itself or you can use /f for a forceful kill.

The Windows NT Resource Kit had a tool called srvany.exe which could turn any exe into a service. This would allow you to use net start and net stop to start/stop this service. This is the better solution if you can get ahold of srvany.
 
Add this to your batch file and configure task scheduler to run it.

To Kill:
taskkill /IM /f blah.exe

To Shutdown:
shutdown.exe -s -t 20 -f

To restart:
shutdown.exe -r -t 10
 
Back
Top