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.


sk_5910
2019-02-20T05:45:17Z
Hello,

I am very new to Visual Cron & may be looking at this the wrong way; however any help would be greatly appreciated.
I have a JOB that needs to run a SQL against two separate DBs & compare the Output - if they are the same, I run a "success" email TASK, otherwise a "FAILURE" email step is run. I need to pass a "Run Date" to the SQL queries, typically this will be yesterday's date (ie CurrentDate-1) - I have a JobVariable (RunDate) that I set in the first step of the JOB. This all works fine.

Sometimes I may need to rerun the JOB for a specific date (not "yesterday"). When I start the JOB "with options", I am presented with the Job Variables & I can set the RunDate Job Variable to the date of my desire. So, Step-1 of the job nukes the JobVariable back to "yesterday" (as expected). So I tried setting the RunDate to "NONE" & set a condition on Step-1 to check if the RunDate is set to "NONE" & if so set it to "Yesterday". If the RunDate is anything else, leave it alone...

For some reason the JobVariable RunDate is being permanently changed to the value I use when starting the Job "with options". I would have assumed the value would be temporary for the execution of that Job run.

Am I going about this wrong? Is there any way I can override the normal settings of the JOB & change the RunDate variable just for this execution? When the Job triggers normally next time I want it to use "Yesterday's" date... I could set the Variable & skip the first step, but that's clunkier than I want...

Thankyou for anything you can provide to assist...
Sponsor
Forum information
thomas
2019-02-20T11:38:42Z
As long as you don't check the 'Update Job variables' box, it works the way you want. At least in 8.4.1
Scroll to Top