Running background processes

  • Thread starter Thread starter Robert S
  • Start date Start date
R

Robert S

I posted a question a few days ago about getting a program to run
continously in the background. I was advised to start the program as a
scheduled task when the computer boots up. Initially this seemed to work
very well.

Unfortunately the program is a bit flakey and occasionally stops running.
Can somebody advise a way that it could be checked and restarted if it dies?
Its not *absolutely* critical that it runs all the time, so an hourly check
would be OK.
 
Robert S said:
I posted a question a few days ago about getting a program to run
continously in the background. I was advised to start the program as a
scheduled task when the computer boots up. Initially this seemed to work
very well.

Unfortunately the program is a bit flakey and occasionally stops running.
Can somebody advise a way that it could be checked and restarted if it dies?
Its not *absolutely* critical that it runs all the time, so an hourly check
would be OK.

You can use the Task Scheduler to run this batch file once every hour:

@echo off
tasklist | find /i "Flakey Program.exe" && goto :eof
"c:\Program Files\Some Folder\Flakey Program.exe"
 
You can use the Task Scheduler to run this batch file once every hour:

@echo off
tasklist | find /i "Flakey Program.exe" && goto :eof
"c:\Program Files\Some Folder\Flakey Program.exe"

Excellent.

Actually - I just realised that the task was only set to run for 72 hours
(the default setting). That's why it stopped after a few days.

I think I'll use your script to check that its running anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top