SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Remote Agent resources

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Remote Agent resources
Author Message
Sysadmin



Joined: 05 May 2004
Posts: 4

Post Remote Agent resources Reply with quote

I am running remote agent on a windows 2000 server with SQL Server 2000.
I have one script:

Dim window_handle,number

WindowWaitOpen "Retail%",0
WindowFind "Retail%",window_handle
WindowActivate window_handle
WindowClose window_handle

I have the scheduler set to restart the script when it finishes so it
will wait for the dialog box to appear and automatically close it.
Whenever I run this using the remote agent, the task manager shows a
dramatic increase in CPU resouces (85-90%) being allocated to the 24x7 process. This slows all other program on the system to a crawl.
I have considered using a loopwhile statement in the script but I don't
want to create an endless loop in the script. Is there anything I can do to
reduce the CPU usage while runnign this script?

Wed May 05, 2004 3:55 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Re: Remote Agent resources Reply with quote

The way you have done it is not good in such situation. WindowWaitOpen should be used in cases when you start a program or some process and want to catch the moment when certain window is opened. Do not use it to wait for the window to appear indefinitely. WindowWaitOpen with 0 wait parameter causes it internally to constantly loop through all opened windows checking which window's title matches the specified value. This of course causes heavy load on the system.

You have several options.
1. Set the job priority to "Low". This will allow the system to give less CPU ticks to the job process.
2. Set the agent main process priority to "Low". This also will allow the system to give less CPU ticks to the job process.
3. Rewrite the job to use a less CPU intensive method, for example

Dim window_handle,number

TRY_AGAIN:
OnErrorResumeNext
WindowFind "Retail%",window_handle
OnErrorStop
Ifthen window_handle, CLOSE_IT
Wait 10
GoTo TRY_AGAIN

CLOSE_IT:
WindowClose window_handle

: I am running remote agent on a windows 2000 server with SQL Server 2000.
: I have one script: Dim window_handle,number

: WindowWaitOpen "Retail%",0
: WindowFind "Retail%",window_handle
: WindowActivate window_handle
: WindowClose window_handle

: I have the scheduler set to restart the script when it finishes so it
: will wait for the dialog box to appear and automatically close it.
: Whenever I run this using the remote agent, the task manager shows a
: dramatic increase in CPU resouces (85-90%) being allocated to the 24x7
: process. This slows all other program on the system to a crawl.
: I have considered using a loopwhile statement in the script but I don't
: want to create an endless loop in the script. Is there anything I can do to
: reduce the CPU usage while runnign this script?

Wed May 05, 2004 4:06 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.