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.


bweston
2017-04-28T18:33:36Z
I upgraded to version 8.2.6 last week, and have just discovered a change that caused some of my jobs not to work correctly.

One of the key tasks of the job was a SQL task with the following as its execute text:

/*{TASK(PrevTask,StdOut)}
--*/


The preceding task was a Powershell script that built the query in a variable and then printed it to StdOut at the end, preceded by a
*/
. That way if the code that created the output ever caused any output of its own for some reason, it would be commented out in the query.

After the upgrade, as best I can tell from the tests that I have run, the
{TASK(PrevTask,StdOut)}
no longer gets replaced before the query is sent to SQL, which prevented this task from doing what it was supposed to do for about a week before I realized what was happening. If I remove the comment from around it, it does get replaced. As best I've been able to determine so far, this behavior seems specific to SQL tasks.

If I remember correctly, I actually put this approach in place originally because there was a VisualCron version quite some time ago in which the output of Powershell tasks was being preceded by a bunch of VisualCron powershell internals information, and that had broken the task because it resulted in SQL syntax errors; that was why I didn't just do the entire comment-wrapping of any unexpected output inside the Powershell task itself.

Was this change unintentional, was it announced somewhere in the changelogs that I'm not seeing, or was it intentional but not announced because it was expected to be inconsequential?

As a side note, it appears that the task variable
{TASK(PrevTask,Query)}
from a SQL task is not, as I'd expected/hoped, the query that was actually executed on the last run, but rather the content of the query text box, and if that variable is output via a Powershell task, any Visualcron variables (inside SQL comments or not) that are in that text will get evaluated THEN. This had me barking up the wrong tree for a couple of hours convinced that somehow my SQL task was considering itself to be its own PrevTask.
Sponsor
Forum information
Support
2017-05-02T07:04:24Z
I do not recall which exact version but we added support for having SQL comments in code. By support we mean that we strip out before executing and then avoiding problems when executing. So, in your case you cannot have Variables inside comments as they will be removed.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
mnp
2019-08-01T08:34:39Z
Hi, sorry for necroing this thread but this change also made it so it is no longer possible to pass hints to the optimizer.
Is there some way to make visualcron not strip the comments?
Support
2019-08-01T09:56:22Z
Originally Posted by: mnp 

Hi, sorry for necroing this thread but this change also made it so it is no longer possible to pass hints to the optimizer.
Is there some way to make visualcron not strip the comments?



Hi mnp. This is currently not possible. I suggest that you make a feature request for this here:
https://www.visualcron.c...;name=Feature%20requests 

Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top