How to count running robotask.exe processes

Discuss RoboTask here
Post Reply
Shawnturner
Posts: 1
Joined: Fri Oct 27, 2017 12:49 pm

How to count running robotask.exe processes

Post by Shawnturner »

Hello Everyone,

we got some trouble after robotask.exe was running parallel in three different processes on one VM. All the scheduled processes run threetimes, filled up database tables with same data etc..
I don't know how we could came into this situation.

How can I set up a task for counting the number of currently running processes of robotask.exe?

OS: Windows 2008 R2 Standard, SP1
Robotask: 6.2.0.859

Any Idea , Suggestions would be appreciated,

Thanks,

I didn't find the right solution.
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: How to count running robotask.exe processes

Post by Oleg »

You can use TASKLIST.EXE system utility to enumerate processes
also look at the task below how to count ROBOTASK processes in the system.
RoboTask can be running only once within user session. You can get many images if you have many user sessions on your server (for example RDC sessions)
I have only two images of RoboTask.EXE process: from my user session and system service

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1360203151
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task154"
Hide=INTEGER|0
ID=INTEGER|-2060590109
LogOnAsUser=INTEGER|1
Name=STRING|"count RoboTask processes"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_MISC_RUNCONSOLEAPP"
Enabled=INTEGER|-1
Name=STRING|"Run command-line utility: tasklist /FI ""IMAGENAME eq robotask.exe"" /nh"
Params=FOLDER

[Actions\Action1\Params]
convertansi=STRING|"1"
ifnonzero=STRING|"0"
outputvar=STRING|"out"
params=STRING|"/FI ""IMAGENAME eq robotask.exe"" /nh"
program=STRING|"tasklist"
saveexitcode=STRING|"0"
saveoutput=STRING|"1"

[Actions\Action2]
ActionID=STRING|"A_STR_TRIM"
Enabled=INTEGER|-1
Name=STRING|"STR Trim"
Params=FOLDER

[Actions\Action2\Params]
custom=STRING|"0"
eol=STRING|"1"
lead=STRING|"1"
source=STRING|"{out}"
spaces=STRING|"1"
tabs=STRING|"1"
trailing=STRING|"1"
variable=STRING|"out"

[Actions\Action3]
ActionID=STRING|"A_TXT_NUMBEROFLINES"
Enabled=INTEGER|-1
Name=STRING|"TXT Number of Lines"
Params=FOLDER

[Actions\Action3\Params]
external=STRING|"0"
line00000000=STRING|"{out}"
linecount=STRING|"1"
variable=STRING|"num"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""RoboTask is running {num} time(s)"""
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"RoboTask is running {num} time(s)"
msg1=STRING|"********************"
msg2=STRING|"{out}"
msgcount=STRING|"3"
playsound=STRING|"0"
showmessage=STRING|"1"
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Oleg Yershov
Post Reply