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


Gary_W
2019-06-28T20:13:48Z
Running 8.5.2 beta on a test server testing the task repository. The powershell task in the repository counts lines in a file using streams and accepts 3 params, filename, number of header rows to skip and number of trailer rows to skip. The params are set so the values are active task job variables. Note if I hardcode values and not use params this works as expected. if I hardcode the param values in the param settings of the powershell task it works as expected. If the param values are active job variables they are not found.

The job to test this has 1 task that attempts to set a job variable with the result from the task repository task get_line_count. When selecting "return the result of the script" (which causes the script to run) via the variable viewer, it hangs and the task manager shows the VC powershell process sucking up memory like no tomorrow. When this process is killed, the error displays in the variable window indicating the file was not found.

Not being able to use a job variable to pass data to a task repository task really limits the functionality. Or am I not using the task repository as it is intended?

Sponsor
Forum information
Support
2019-07-02T18:07:57Z
The idea is that it should work. I am passing this information to developers.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2019-07-03T15:09:05Z
Gary_W
2019-07-03T16:37:16Z
Tried Build 29954 and the job variable still does not get set. If I put double-quotes around the filename in the job variable, a background powershell task starts that sucks up memory but the job variable gets set to NULL. Keep an eye on task manager.

I attached a file containing the export of the job and the task repository entry, along with the file I am using for testing. Maybe this will help research what is happening.

  Gary_W.zip (6kb) downloaded 40 time(s).

I noticed when I call the repository task from the value section of the set variable task, there is a pipe after the task_id. Does that imply arguments to the powershell task in the repository should follow? I tried and got "credential not found" so clearly something can be put there.

{TASKREPOSITORY(cac72ba7-a697-4663-96e4-cbe001187305|)}

Correction: The variables window shows the 2nd arg is indeed a credential.
Support
2019-07-03T16:46:03Z
Please export the Task repository object all related Jobs and send to support@visualcron.com


EDIT: Sorry, see the files now.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2019-07-03T18:12:38Z
Gary_W
2019-07-03T18:59:46Z
Worked as expected.
Used a space instead of an underscore in the filename and job variable: worked.
Surrounded the filename with double-quotes in the job variable-came back set to null and left a powershell process sucking up memory.

Thanks for your attention on this!

Gary
Support
2019-07-03T19:25:03Z
Originally Posted by: Gary_W 

Worked as expected.
Used a space instead of an underscore in the filename and job variable: worked.
Surrounded the filename with double-quotes in the job variable-came back set to null and left a powershell process sucking up memory.

Thanks for your attention on this!

Gary



Great, how can we reproduce the Powershell issue? Something specific to your script or?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Gary_W
2019-07-03T19:32:11Z
Put double-quotes around the filename in the job variable {JOB(Active|Variable|source_file)} in the test job. Open the task manager, start the job. The task finishes and assigns null to the job variable {JOB(Active|Variable|line_count)}. Meanwhile, a VC powershell task is left running in the background gulping memory as seen via the task manager detail tab.

Same happens if you view the task repository task via the variable window and click on "return the result of the script".
Support
2019-07-08T13:09:03Z
Originally Posted by: Gary_W 

Put double-quotes around the filename in the job variable {JOB(Active|Variable|source_file)} in the test job. Open the task manager, start the job. The task finishes and assigns null to the job variable {JOB(Active|Variable|line_count)}. Meanwhile, a VC powershell task is left running in the background gulping memory as seen via the task manager detail tab.

Same happens if you view the task repository task via the variable window and click on "return the result of the script".



I think what you describe is a problem with the script rather than VisualCron. I mean - It depends how the script is written.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top