Page 1 of 1

Find errors in logs

Posted: Thu Jun 02, 2011 6:08 pm
by JMBPHP
Have a task scheduled to run a .vbs to check the logs for the word ERROR and generate a MSGBOX with the log name.   Since the log name are RTcreated it can be cumbersome to review the log and quickly determine which task had a error since the logs do not contain the "given" task name.
Is there a table or other option that would give the name of the task?
 

Find errors in logs

Posted: Fri Jun 03, 2011 5:15 am
by Oleg
See system variables in "Task Information" group:
{TaskCategoryID}
{TaskExtName}
{TaskID}
{TaskName}
You can pass this information to your VBS script.

But pay attention: these variables can work only in the task context.

See the example below:
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1663346572
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task206"
Hide=INTEGER|0
ID=INTEGER|1728171285
LogOnAsUser=INTEGER|1
Name=STRING|"Test Task Infomation"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER

[Actions\Action1]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Category: {TaskCategoryID}"""
Params=FOLDER

[Actions\Action1\Params]
icon=STRING|"1"
msg0=STRING|"Category: {TaskCategoryID}"
msg1=STRING|"External name: {TaskExtName}"
msg2=STRING|"Task ID: {TaskID}"
msg3=STRING|"Task Name: {TaskName}"
msgcount=STRING|"4"
playsound=STRING|"0"
showmessage=STRING|"1"