[Solved] Job/Task control "Job Variables" - VisualCron - Forum

Community forum

LEikelman
2015-05-22T15:13:45Z
I'm having an issue calling a inner/child job from within multiple outer/parent jobs at the same time. Basically, my flow is this:

We have a standard job that takes some variables and performs 7 steps. These variables include things like folder locations, integers and GUIDs. This job has no triggers, as it will be executed by other jobs. Those other parent jobs will set job variables for the standard job as ({JOB(Active|Variable|Foo)}, {JOB(Active|Variable|Bar)}. The end result is that if multiple parent jobs attempt to call the standard job, only the last job will complete successfully. I believe that the first instance of JOB(Active|Variable is getting overwritten by the second instance, which causes the first one to fail but the second one to complete.

So, my question is this. Can I have these jobs run with their own set of variables rather than a kind of "global" variable? If not, then can I queue these requests to the child job and hold the second (and subsequent) instances until the first one is completes?

I should also mention we are running VisualCron 7.6.4 build 15110.
*********************************** UPDATE ***************************************
Here is a simple example that I was able to put together that recreates the issue I'm having:

Child job with 3 tasks, and 1 job variable. Also mark as "put job in queue":
Task 1 - List files in a directory of your choosing. Make the "File Mask" the value of the job variable
Task 2 - Wait 30 seconds
Task 3 - Clone of task 1

Parent Job 1: Pass child job variable as "*.pdf"
Task 1 - Call child job

Parent Job 2: Pass child job variable as "*.txt"
Task 1 - Call child job

The behaviour I've noticed is that when you start "Parent Job 1", then during the wait process of the child job, start "Parent Job 2", job 2 will say "Queued", but then continue on to the next step (should it not wait?!?) The child job will then continue on listing all PDFs for task 3, but then when the job starts up again (presumably for the call from "Parent Job 2") it will look again for PDFs, not TXT files like instructed. If you reverse it and run "Parent Job 2" first you'll get the opposite behaviour (all TXT files twice and never PDFs).

I have this currently setup in VC 7.6.4 and can export and email if need be. Please help!

Thank you!
thomas
2015-05-26T11:18:35Z
I think you are probably right. The 'Translate Variables before sending' does not seem to have any effect when a job is put in a queue. Once a job starts running after having been queued, it 'forgets' to translate variable. Looks like a bug to me.

There seems to be another issue also: When a job is queued, it correctly receives the status 'waiting'. However, when it is finally scheduled to run (ie nr 1 in the queue), it never gets the status 'running'. It just keeps the status 'waiting' even though the child job is clearly running.

Thomas
Support
2015-05-26T12:02:27Z
We will look at this and get back to you. Thanks for the report!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2015-06-02T13:18:01Z
We have fixed issues in this version, please test:

http://www.visualcron.co....aspx?g=posts&t=4994 

Thank you for the report!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top