Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


billweh
2008-05-19T17:32:32Z
I want to create a generic notification task that tracks information about what job just ran. Ideally I'd like to track the success/failure of the job as well and I want to do it from a single notification.

So in my Notifications section on each job, I'd like to have it log to SQL Server the name of the job, the date/time run, the next run time, the description and if it was a success or failure.

Right now my notification is set for Complete and Failure - the problem is that if it fails, I get two entries in my database. One that it completed, the other that it failed.

I also notice that many times when I try to use the ActiveTask notifications - I get a lot of [Job does not exist or is not selected].

I set up a test notification that would email me when the job was complete. I set the body to:

Exit Code: {TASK(Active,ExitCode)}
Exit Desc: {TASK(Active,ExitCodeDesc)}
Output: {TASK(Active,StdOut)}
StdErr: {TASK(Active,StdErr)}
Status: {TASK(Active,Status)}
Result: {TASK(Active,Result)}


The email I got was:

Exit Code: [Job does not exist or is not selected]
Exit Desc: [Job does not exist or is not selected]
Output: [Job does not exist or is not selected]
StdErr: [Job does not exist or is not selected]
Status: [Job does not exist or is not selected]
Result: [Job does not exist or is not selected]


What's the best way to get information out of a job that just ran? I don't want to have to create a specific notification for every job.
Sponsor
Forum information
Support
2008-05-20T21:21:45Z
Active parameter is a little bit special. It cannot be used at Job level, only at Task level. Otherwise VC won't know which of the Tasks in the Job you are referring to.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2008-05-21T08:57:19Z
I have this notification at every task level as a notification:

{TASK(Active,LastRun,G)}
- - - - - - - - - - - - - - - - - - - - - - - - - -
{TASK(Active,Name)} : {TASK(Active,Result)}
- - - - - - - - - - - - - - - - - - - - - - - - - -
{TASK(Active,StdOut)}
-
{TASK(Active,StdErr)}



The file is saved to a log dir:

log\{JOB(Active,Name)} - {JOB(Active,LastRun,yyyyMMdd HHmmss)}.txt


So now you have a log dir with filenames of every jobs starting time and all task entries are in the file.

Uses Visualcron since 2006.
Scroll to Top