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


keithdavis
2012-11-27T02:53:48Z
We copied the settings from another server (import), and a certain task is failing and when it does, we get this:

From: SERVER09 [mailto:SERVER09@pridedallas.com]
Sent: Monday, November 26, 2012 8:50 PM
To: # IT
Subject: VisualCron - SERVER09 - Error - PBOYD - Copy Olympus Setting Files

"[Error in SetVariables, string: Computer: {COMPUTER(Name)}
Date/Time: {DATETIME()}
Task: {TASK(Active|Name)}
Executed at: {TASK(Active|LastRun|M/d/yyyy h:mm tt)} Job Error: {TASK(Active|Result)} Task Output: {TASK(Active,StdOut)} Errored On: {LOOP(CurrentValueXArray,0)}, err: Object reference not set to an instance of an object.]"


The same variables are being using in the Subject and they work (SERVER9, for example.) What does that mean?
Sponsor
Forum information
Support
2012-11-27T07:48:24Z
The problem could be that you are using the Notification in a Job instead of a Task while you are refering to a specific Task in the Notification.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
keithdavis
2012-11-27T19:43:55Z
Nope, I just checked. It's correct.
keithdavis
2012-11-27T20:16:03Z
Tried re-creating the task error notification email, but to no avail.
bbusse
2012-11-27T20:34:23Z
Can you copy the entire text as it is from your e-mail notification 'Message/Body' tab and paste it in a new reply?

Brian
Support
2012-11-27T20:36:18Z
I am suspecting that the Loop does not cover the Notifications part. Need to validate this though. It should work with Email Task anyway.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bbusse
2012-11-27T20:38:55Z
Originally Posted by: Support 

I am suspecting that the Loop does not cover the Notifications part. Need to validate this though. It should work with Email Task anyway.



I'd tend to agree with you. Kinda like my post I just made about Conditions and loop variables, I assume you can't use them as a condition value either.

Brian
keithdavis
2012-11-28T05:48:46Z
So how are we to know what failed?

Computer: {COMPUTER(Name)}
Date/Time: {DATETIME()}
Task: {TASK(Active|Name)}
Executed at: {TASK(Active|LastRun|M/d/yyyy h:mm tt)}
Job Error: {TASK(Active|Result)}
Task Output: {TASK(Active,StdOut)}
Errored On: {LOOP(CurrentValueXArray,0)}
bbusse
2012-11-28T14:49:11Z
Originally Posted by: keithdavis 

So how are we to know what failed?

Computer: {COMPUTER(Name)}
Date/Time: {DATETIME()}
Task: {TASK(Active|Name)}
Executed at: {TASK(Active|LastRun|M/d/yyyy h:mm tt)}
Job Error: {TASK(Active|Result)}
Task Output: {TASK(Active,StdOut)}
Errored On: {LOOP(CurrentValueXArray,0)}




Unless the developers of VC make the LOOP variables available in other areas outside of the job itself (Notifications, Conditions, etc...) you will likely need to do what I have done, which is add 2 additional tasks.

One of them, creates a new variable somewhere early on in the loop:

Variable Name:  LoopVariableYouCreated
Variable Value:  {LOOP(CurrentValueXArray,0)}
I'm pretty sure you also need to check the box for 'Translate to constant when running'.


Then, for your notification, you'd have to use the variable you created instead, like below


Errored On: {USERVAR(LoopVariableYouCreated)}


Then of course, it would be good if you also deleted this variable afterwards with a "Remove Variable" task.

This does of course require that you're using a completely unique notification for this one job, as that variable should only be used BY this one job so you don't have mixed data possibly being fed into the variable from other jobs/tasks.

Brian
keithdavis
2012-11-29T16:26:46Z
Thanks for the input, but more trouble than it's worth. It's already hard enough to maintain consistency across all of the various servers that run VisualCron, but to have individual notifications for these jobs is just adding more difficulty to that.
Scroll to Top