: You already have these copies saved in the Performance Data directory. There : should be a full history of your script runs since you enabled the tracing : option. Log file names have format [job id].log. While script.log could be : a mix of several jobs running at the same time, these log files have clear : output for each job. : VBS currently doesn't write trace files because the entire job script is sent : to VBS engine as a single piece of text and 24x7 doesn't get any : notifications about line execution. : To implement the tracing in VBS you can add you own function calls to write : some data to a log file. Here is an example of how to do that: This is : your VBS job : Sub Main() : WriteTrace(True, "Starting 1 ....") : ... 1. you do something here : WriteTrace(False, "Starting 2 ....") : ... 2. you do something here : WriteTrace(False, "Done") : End sub : Sub WriteTrace(add_header, text) : Dim fso, log : Set Fso = CreateObject("Scripting.FileSystemObject") : Set log = Fso.OpenTextFile("@V"24x7_home"\Performance : Data\@V"job_id".log", 8, 1) : If add_header Then : log.WriteLine("*******************") : log.WriteLine(Date() & " " & Now()) : log.WriteLine("*******************") : End If : log.WriteLine(text) : Set log = nothing : Set fso = nothing : End Sub ...okay, that makes sense - of course you'd pass the script to the MS engine. Thanks for the code, too; I used it in key stages I wanted to isolate, and that saved me from re-writing 30-some scripts. You guys are alright - I think I'll keep you.
|