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.


dkocur
2014-04-10T22:50:29Z
We started using Visual Cron with version 6. I created a generic "something went wrong" email notification as follows:

"{JOB(Active|Name)}" failed on {DATEFORMAT(M/d/yyyy)} at {DATEFORMAT(h:mm tt)}!

Job Description: {JOB(Active|Desc)}
Failed Task: {TASK(Active,Name)}
Task Type: {TASK(Active,Type)}
Exit Code: {TASK(Active,ExitCodeDesc)} ({TASK(Active,ExitCode)})
Output Text: {TASK(Active,StdOut)}
Error Text: {TASK(Active,StdErr)}

It worked great. Whenever there was a failure, all the pertinent information was passed on, and I could reuse the same notification for all jobs.

Then, we installed version 7, and now all our notifications look something like this:

"Ping Machines Used for Remote Access" failed on 4/10/2014 at 5:30 PM!

Job Description: Check to make sure machines that are needed for remote access in the event of an ice day or other emergency are up and running.
Failed Task: VisualCron Job Failure
Task Type: Email
Exit Code: The operation completed successfully. (0)
Output Text:
Error Text:

Note: "VisualCron Job Failure" is the name of the email notification.

So, with version 7, the "Active" task is the email notification, so we're not getting any useful information in the email. Ideas?
Sponsor
Forum information
bbusse
2014-04-11T00:19:08Z
I'm using my phone, so I can't validate, but you are correct. Notifications are now their own task, so you have to use PrevTask and PrevJob instead.

Brian
Support
2014-04-11T06:20:07Z
Yes, the reason behind this is that in version 7 we converted Notifications to Task Notifications (inherited from Tasks). We did that to be able to use any Task as Notification, get more features and have one code base. This resulted in that when you use Active it points to the current Task which is the Notification in this case. Use PrevTask instead and it will work like before.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dkocur
2014-04-14T19:24:09Z
Got it. I search all through the variables to find a "Previous Task" variable before posting this. I completely overlooked the Context radio buttons at the bottom of the page. Thanks!
Scroll to Top