Possible to Retrieve Specific Server Tasks with Script?

Basically, need to know if there is a way from inside script to do a Show Task and find out if any converts are running.

If there are, recheck Server Tasks till there are no converts running and then continue on with the next step.

Any ideas would be greatly appreciated.

Thanks,

Shane Meisner

The Full story is below for those that want more details…

Working on a agent that will upgrade specific Mail files in a view with the convert task and then run a Updall to rebuild the InBox view.

We have decided to only run 4 converts at a time to keep server performance at a good status.

We want to send off 4 converts and when all 4 converts have completed, run Updall against those Mail files and then continue on to the next 4.

I originally wrote the agent to Sleep for 5 minutes after it had finished the 4th convert, then fire off Updall and had the Agent sleep again for a 10 minute period.

Problem here is it is a guess and most times is wasting time. Most Converts are done in a 2 to 3 minute period, with Updalls taking another 1 to 5 minutes depending on the size of the Inbox.

To make the application more “robust” we’d like it to check for the convert task and run the updalls right after the last convert runs.

As part of the script we are also shutting down the Router and checking the Mail.box file for message’s.

If the message count gets larger than 150, we stop issuing Converts, Reload Router, and when back down below 20 message’s shut the router off and start again.

Thanks Again,

Shane Meisner

CLP Notes Developer/Administrator

Subject: Possible to Retrieve Specific Server Tasks with Script?

how about using this:

This agent sends a console command to a server.

%INCLUDE “lsxbeerr.lss”

Sub Initialize

Dim session As New NotesSession

serverName$ = “mjr”

consoleCommand$ = “Show Tasks”

consoleReturn$ = session.SendConsoleCommand( _

serverName$, consoleCommand$)

End Sub

then search the consoleReturn$ for the word “convert” (or whatever word commonly shows up when convert is running). have the script loop until the word is no longer found then kick off your updall …

HTH

Subject: RE: Possible to Retrieve Specific Server Tasks with Script?

Thanks!!

So far testing is working here is part of the script:

sendtoconsole:

consoleCommand = "Show Task" 	

consoleReturn = session.SendConsoleCommand( _

	serverName, consoleCommand)			

TaskList = consoleReturn

FindTask = "Convert"

		

If 	(  Instr( TaskList, FindTask) ) Then

		Sleep (120) 'wait 2 minutes before checking again

	Goto sendtoconsole 'Recheck for convert			

End If

Thanks Again,

Shane Meisner