How to access the task manager from Lotus Script

We have Lotus Notes web and scheduled agent running on Domino on top of  Windows NT.

Those agents are using Lotus Script to activate EXCEL using
Set Excel = CreateObject( "Excel.Application" )            

However before I start to execute this line I would like to check if Excel is already running on the server and if active wait till it is finished. Running more than one instances of Excel at the same time seems to cause problem such as server crash.

We have set the number of concurrent agents to 1 so we do not have a problem with web agents but we still have conflicts between scheduled agents using excel and web agents which also use excel.

Any idea is more than welcome

Yves
YvesSyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill-HansonCommented:
The correct way to get a COM object is to first use GetObject to get a running instance (if any), then fail over to CreateObject if the app is not already running.

Example:

Set Excel = GetObject( "", "Excel.Application" )
If (Excel Is Nothing) Then Set Excel = CreateObject( "Excel.Application" )

Since you are trying to wait for Excel to close, you could try this:

Do While (True)
      Set Excel = GetObject( "", "Excel.Application" )
      if (Excel Is Nothing) Then Exit Do
      Set Excel = Nothing
Loop
Set Excel = CreateObject( "Excel.Application" )
0
Sjef BosmanGroupware ConsultantCommented:
0
YvesSyAuthor Commented:
The problem is that the system did create the object but is was stuck. I solved the problem by creating a Queue for the excel jobs which is executed by a scheduled agent running every 15 minutes
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.