Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitor a Shelled .bat file

Status
Not open for further replies.

bakerm

Programmer
Apr 25, 2000
53
US
I have written a program that will allow a user to start as many instances of a .bat file, using the SHELLEXUCUTE API, they want. Each instance may vary in the amount of time it takes to finnish, depending on server load.

I would like to know if anyone has any ideas on how to monitor each instance and determine how long it took to run each .bat file from start to finnish?

Thanks in advance for any ideas!!!

Mark
 
Will there be multiple instances of the Bat file running at the same time, thus meaning that the calling program must be running asynchronosly with the various bat files, or can the calling program suspend itself until the bat file finishes? Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Cajun,

There will be an unlimeted number of instances of the same .bat file running at the same time.
 
One option you might want to consider is passing a parameter to the bat file from the calling program. That parameter would be used by the bat file to create a file, as its first task. The last thing that the bat file would do is to make a change to that same file.

The main calling program would then be able to determine, by filename, which bat file created/modified that file, and could determine its time of execution by comparing the FileCreated TimeStamp with the FileLastModified TimeStamp. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top