Solved

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

Posted on 2006-07-17
9
279 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
9 Comments
 
LVL 85

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now