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.


rprastein
2010-10-30T05:58:55Z
I'm still working with my 5.7.0 test build, and still working on the same job checking on the status of our remote web server. I've just added a new task that checks how long it took, and sending an e-mail if it was over 3 seconds.

That task seems to work (I get the e-mail), but then I get a failure e-mail, which should have been from the task before it, indicating the web page retrieved is not the correct one.

Here's the sequence:

1. Send post request
2. Check if the previous task had an error or returned the wrong page, in which case send failure e-mail
3. Check if the post task succeeded (no error) and took longer than 3 seconds, in which case send a slow-response e-mail.

**************************************************************

The actual text of the slow response e-mail looks correct:

Subject: Slow calculation and response from MSScalculator
Body:
The response from the webcalculator was unacceptably slow (> 3 seconds).
The actual time to complete the post task was: 27.895


The actual text of the failure e-mail looks wrong:

Subject: Failure of MSScalculator post and calculation
Body:
"[Error in SetVariables, string: The response to the attempted Web Calculator post did not include "NOT FOR PLACEMENT IN PATIENT CHART".

Actual server response (stdout):
{TASK(4601e4fb-e311-4c72-86c3-a026348ae483,StdOut)}

Actual server response (stderr):
{TASK(4601e4fb-e311-4c72-86c3-a026348ae483,StdErr)}, err: Array cannot be null.
Parameter name: bytes]


**************************************************************


When I look at my jobs display, I see all three tasks and the job as a whole show success.
When I look at the output of the post task, nothing shows up on the main display. If I double-click to bring up the window, I see the first part of my web page:














<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <link rel="stylesheet" href="style/style.css" type="text/css" media="screen,projection" />
        <title>Quest Diagnostics First Trimester Screen Instant Risk Calculator Prototype</title>
        <!--
        <script type="text/Javascript"
            src="js/browser.js">
        </script>
        -->
        <script type="text/Javascript" 
            src="js/hcp_navigation.js">
        </script>
        <script type="text/Javascript" 
            src="js/stylesheet_selection.js">
        </script>
        <script type="text/Javascript" 
            src="js/leaving_site.js">
        </script>
    </head>
    
    <body vLink="#003366" aLink="#cccccc" link="#003366" bgColor="#ffffff" 
        leftMargin="0" background="js/hcp_bg_main.jpg" 
        topMargin="0" marginwidth="0" marginheight="0">

        <!--- top navigation ---->
        <script> global("http://www.questdiagnostics.com");</script>
        <script> navHome("http://www.questdiagnostics.com");</script>

        <!--- main content - table width is taken from the functions in js/hcp_navigation.js -->
        <font face="arial">
        <table cellspacing="0" cellpadding="0" border="0" width="750">
            <tr>
                <td width="50">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                <td width="700">
                
<!-- header and footer saved from url=http://www.questdiagnostics.com/hcp/egfr.html -->


<noscript>
    <p>You must have Javascript enabled to use this calculator.</p>
    <p>
        The Javascript performs important input data validation


When I click on "Get full output" so I can search manually for the string I'm looking for, I get nothing appearing in the window.

If I click on the HTML tab, still nothing.

If I click on the XML tab, I see
<error>
   Output was not loaded correctly - perhaps you ned to press Get full output
</error>


This job was working before I added the third task. Any thoughts?

Thanks,

Rebeccah
Sponsor
Forum information
rprastein
2010-10-30T06:28:03Z
I just ran the test again, and this time the output window defaults to the XML tab, and shows the same error. The text tab shows the same initial text of the page, but this time if I click on Get Full output, I do get the full output - and it is the correct web page.

Now what I think is happening is that there is a race condition between my two e-mail tasks, and they are completing in the wrong order. The slow-response e-mail task is completing before the check-for-failure-or-wrong-page task. The check-for-failure task's conditions are based on the *previous* task, which now turns out to be the other e-mail task, and its standard output does not include the string I'm looking for, so the failure/wrong page e-mail goes out as well.

I can probably work around this by checking output for the specific task I'm interested in, rather than the previous task. I'll try this and get back to you.

Rebeccah

edited to add: it turns out I screwed up my failure conditions when I cloned them as a template for my slow conditions, which would explain why the message said the output was wrong when it wasn't. See subsequent posts for more information about the weird error and the timing of the two e-mails, though.
rprastein
2010-10-30T06:38:48Z
Well, I can't specify that the output of an arbitrary task *contains* a string, only that it is equal or not equal. So, that work-around (or test of race condition hypothesis) is out.

Rebeccah
rprastein
2010-10-30T07:06:19Z
OK, I added a 5-second wait task in between the two e-mail tasks, and now I get a failure e-mail when I fetch the wrong page, and no failure e-mail when I fetch the right page. And I get the slow response e-mail both times, as expected.

Yep. If I remove the 5-second delay task, I get the "[Error in SetVariables, string: The response to the attempted Web Calculator post did not include "NOT FOR PLACEMENT IN PATIENT CHART".

Actual server response (stdout):
{TASK(4601e4fb-e311-4c72-86c3-a026348ae483,StdOut)}

Actual server response (stderr):
{TASK(4601e4fb-e311-4c72-86c3-a026348ae483,StdErr)}, err: Array cannot be null.
Parameter name: bytes]"


error. And when I put the delay in, I do not get the error.

Looks like some nonthreadsafe code in the e-mail task (or perhaps the job itself)...

Rebeccah
Support
2010-11-02T11:04:37Z
Ok, so you only have problems with setting the Variable now? What is the error message? It seems that you have cut of the actual error message.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
rprastein
2010-11-02T19:46:26Z
It's not cut off, but it's kind of hard to see it because it's just tacked at the end of the string.
If I reformat a bit, it looks like:

Error in SetVariables
string: The response to the attempted.... {TASK(4601e4fb-e311-4c72-86c3-a026348ae483,StdErr)}
(that multiline string that includes the text I defined for the body of the e-mail)
err: Array cannot be null.
Parameter name: bytes
Support
2010-11-02T19:56:03Z
There is some character in your output that causes this. Try using a pipe as separator instead, like:

{TASK(4601e4fb-e311-4c72-86c3-a026348ae483|StdErr)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
rprastein
2010-11-02T19:57:36Z
rprastein
2010-11-02T20:17:19Z
Seems to be working fine now with the pipe character instead of the comma.

OTOH, I just changed it back and tried to reproduce my original problem, and I cannot.

Also: The original problem, on the day that I was having the problem, was reproduced when two e-mail tasks were set up to follow one immediately after the other in the same job. The problem disappeared when I inserted a 5-second wait task in between. I can see how potentially a comma in the stdout or stderr could be interpreted as a separator and cause an error composing the e-mail body, and how changing the parameter seaprator to a pipe character could alleviate that. I don't see, however, how that accounts for the difference depending on the timing of two e-mail tasks in sequence.

I will leave the parameter separator as "|" and remove the 5-second delay between e-mail tasks, and let you know if the problem recurs (this task runs once a day, at present).


Rebeccah
zulfredy
2010-12-01T08:43:31Z
hi..our company have bought Visualcron full version.
I created VBScript(script to run external application with looping) with accepted parameter/argument from Visualcron Variables and return output string when error run external application.
I used task type "Execute" to run that vbscript with accepted parameter. when I run that task, Visualcron catch return string from execute vbscript and store that return string at visualcron standard output.
My question: how visualcron catch return string from vbscript and store at visualcron standard output error(StdErr)or vbscript script to inject result string of run vbs to visualcron standard output after run the task?
thanx
Support
2010-12-01T12:55:04Z
When a process is started by the system you have control of output and input streams. The output stream is read into the output of the Task.

zulfredy wrote:

hi..our company have bought Visualcron full version.
I created VBScript(script to run external application with looping) with accepted parameter/argument from Visualcron Variables and return output string when error run external application.
I used task type "Execute" to run that vbscript with accepted parameter. when I run that task, Visualcron catch return string from execute vbscript and store that return string at visualcron standard output.
My question: how visualcron catch return string from vbscript and store at visualcron standard output error(StdErr)or vbscript script to inject result string of run vbs to visualcron standard output after run the task?
thanx



Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top