You can use GetLastError method to get the last error message then you can use LogAddMessageEx to write this or any custom message to the job log file. : I was using the OnErrorGoto command, but can't find any way to write the 24x7 : Scheduler error string to my log file, and OnErrorGoto does not allow 24x7 : Scheduler to write the error string to the Schedule.log file. How do I : capture the error string? : Example, FTP password fails. DateLog is a library script I wrote that writes : to my log file. I want DateLog to write the actual error string returned : from 24x7 Scheduler. Can this be done? : OnErrorGoto ErrorFtp : FTPPutFile ( strFTPServer, strFTPAccount, strFTPPassword, strPGPFile, : strFTPFile ) : OnErrorStop : . : . : ErrorFtp: OnErrorStop : Add ( nbrErrCount, 1, nbrErrCount ) : Concat ( "==>ERROR: FTP Failure to - ", strNotify, strLogEntry ) : DateLog ( blnAppend, strLogFile, strLogEntry ) : Goto SendStatus
|