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.


Dmitrij Kultasev
2019-10-22T09:54:47Z
I'm trying to pass Group/Job/Task names to the Powershell function using following variables:
{JOB(Active|Group)}
{JOB(Active|Name)}

I'm getting "Default group" and "4d121ec7-da70-449a-b910-ef046d26e8a5". Any way I can the values from currently running job?
It's weird, but task name is passing properly.
Sponsor
Forum information
Support
2019-10-22T11:43:00Z
Originally Posted by: Dmitrij Kultasev 

I'm trying to pass Group/Job/Task names to the Powershell function using following variables:
{JOB(Active|Group)}
{JOB(Active|Name)}

I'm getting "Default group" and "4d121ec7-da70-449a-b910-ef046d26e8a5". Any way I can the values from currently running job?
It's weird, but task name is passing properly.



Can you please send screenshot of the error output that you get and of your task settings to support@visualcron.com ?
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Dmitrij Kultasev
2019-10-22T12:56:54Z
It's easy to re-produce:
Create Task in repository and output job name
Create job with single powershell task to output that task repository variable

Screenshot_4.png Screenshot_5.png Screenshot_1.png

It is expected to get the parent job name as it is with tasks
Support
2019-10-22T15:20:09Z
Originally Posted by: Dmitrij Kultasev 

It's easy to re-produce:
Create Task in repository and output job name
Create job with single powershell task to output that task repository variable

Screenshot_4.png Screenshot_5.png Screenshot_1.png

It is expected to get the parent job name as it is with tasks



You cannot use Job|Active as that will always be dynamic - related to the Job that is executing at the moment. If you used the Job Id however it will be exact in this case.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Dmitrij Kultasev
2019-10-23T06:18:53Z
Why is it different than in other global objects? For example in connection you can use Job|Active.
Why can I get TaskId then?
Possible workaround: can I get JobId/Name from TaskId somehow? Is there any other way to get Active Job/Group names inside these scripts?
Support
2019-10-24T21:07:54Z
Originally Posted by: Dmitrij Kultasev 

Why is it different than in other global objects? For example in connection you can use Job|Active.
Why can I get TaskId then?
Possible workaround: can I get JobId/Name from TaskId somehow? Is there any other way to get Active Job/Group names inside these scripts?



At first glance the difference beteween Jobs and Tasks here is that Task repository object has no parent Job. It is like a separate Task and will execute as a separate Task always.

We will investigate this more.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top