?
Solved

how to watch process (exe) is running under window and restart it if it 'die'?

Posted on 2006-07-17
9
Medium Priority
?
285 Views
Last Modified: 2008-02-01
I have a few critical process (exe) programs are running in the background server processes, that are started by scheduler task.   I can see it thru 'taskmgr'.

Now I need to do more:  if any one of the critical processor is 'die', - ie. not in the taskmgr anymore.  How can I re-start it without human attend (or course, it will be nice to be able to send me an email, then start it, and if continue start x times, it will not try to start again).    

1.  Someone told me there is a window utility can do this?  if so, I do not know where to find.  and how to use it
2. if there is NO such utility, anyone know how to write it, or if there is someone sell it.  let me know.

Need experts give me some advise and information on this subject.

thanks

mshox1
0
Comment
Question by:mshox1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 17122965
You could try something like the script I posted here:
http://www.experts-exchange.com/Programming/Q_21791162.html
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 17124413
if you use xp or higher and your critical tasks are written in service, then use windows OS recovery that available on service
0
 

Author Comment

by:mshox1
ID: 17124522
EDDYKT,  we do use XP or higher to write the program in VB6.  what are you means by written in service?  what is wondows OS recovery that available on services..   can you provide me some direction on getting this info,  especially with examples.

thanks

mshox1
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 26

Expert Comment

by:EDDYKT
ID: 17124687
>>what are you means by written in service?

http://vbwire.com/advanced/howto/service.asp


There is recovery tab on each service and you can configure to restart your service if it fail
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 17124689
>>There is recovery tab on each service

There is recovery tab on each service properties
0
 
LVL 9

Accepted Solution

by:
justchat_1 earned 1500 total points
ID: 17127334
This will tell you if a program is running:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20534084.html?query=isrunning&topics=93

You can check it using a timer (ex:every minute) and use shell to reload it if it crashed

Note: If the program hangs but is still running vb makes it very hard to find out-this will require some serious windows hooks...
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17291724
I think I answered the question correctly-awaiting an author response
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question