Henrik,
Here is my scenario:
I have 5 different VisualCron (VC) jobs, each of jobs has one task(A1,A2...A5).
These tasks should all run independently (based on some external processes) my PowerShell(PS) scripts.
Another PS script RunMyTasks which checks those external processes and runs my
tasks (A1...A5) accordingly, only ones of them that has a new data.
When I run my script RunMyTasks directly from PS first task A1 starts in 3 seconds and all tasks are finished in 1 min and 17 seconds (on average).
I created additional VC task myTask which starts my PS script RunMyTasks. So after myTask is started first tasks A1 fires up on average after 1 minute and then on average all 5 tasks A1..A5 are finished in 2 min and 35 seconds.
Just to make point I have copy of tasks A1...A5 called B1...B5 which runs for 7 days worth of data (those are started manually ) and they all inside of one Job finish in less than 2 minutes.
So to conclude:
Jobs A1... A5 called from PowerShell directly using PS script RunMyTasks finish in 1 min. 17 seconds (all jobs running 1 day worth of data).
Running same PS script RunMyTasks from VC to run jobs A1...A5 takes 2 min. 35 seconds (all jobs running 1 day worth of data).
Running copy of A1...A5 from VC directly without calling my PS script RunMyTasks (all jobs running 5 days worth of data) takes 2 minutes.
Some stats:
When running from PS RunMyTasks script:
Total time______________Tasks A1 ... A5 consumed time________
Overhead1 min 20 sec____________1 min 16.8 sec______________________3.2 sec
1 min 22 sec____________1 min 19.3 sec______________________2.7 sec
1 min 19 sec____________1 min 16.6 sec______________________2.4 sec
You can see that my overhead caused by other(not VC related stuff) is around 3 seconds.
When running RunMyTasks script using VC job to start it:
Total job time______________Total VC tasks time____RunMyScript (time from call to respond)
2 min 30.9 sec______________1 min 10.2 sec________1 min 15.6 sec
OVERHEAD 1 min 15.3 sec 2 min 29.3 sec______________1 min 9.4 sec_________1 min 15.1 sec
OVERHEAD 1 min 14.2 sec 2 min 30.6 sec______________1 min 9.9 sec_________1 min 15.4 sec
OVERHEAD 1 min 15.2 sec I narrowed down problem to establishing connection :
When VC calls my PS script, then scripts makes connection request
before it find all tasks on server.
When directly PS script establishing connection to VC it takes 2 seconds,
when VC job calls my PS script it takes 1 minute and 12 seconds to establish
connection with VC!!!
I use standard settings with fully qualified name of Server
and tried both REMOTE/LOCALHOST with no difference.
$Global:Client = New-Object -TypeName VisualCronAPI.Client
$Global:Server = New-Object -TypeName VisualCronAPI.Server
# Standard Settings
$Conn_Port = 16444
$Conn_ConnectionType ='localhost' #'Remote'
Edited by user
2014-01-10T17:28:01Z
|
Reason: Not specified