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


Mark Galpin
2016-09-10T07:45:56Z
hi, hopefully a straight forward one...

I have a job that I want to add a condition to - to prevent it from running unless another job has completed successfully.. *today*

I can see how to add a Visual Cron job as a condition - but that only lets me check the exit status of the job. If the job completed successfully but yesterday that needs to be a failure condition for me.

I can see how to add a variable as a condition, and access the last executed date of the job I want to check, but I'm not sure how to compare it to a time (I was thinking to check last execute date > midnight), so I could then combine it with the condition with the exit status of the job.

Can anyone help on this?
Sponsor
Forum information
Mark Galpin
2016-09-12T10:55:50Z
Solved this one by adding an extra dependent Event log trigger of type (Visual Cron job completed successfully) to the task. I set the wait period to a finite 1 hour for the dependency between triggers which takes care of the problem of checking job completed today.
Support
2016-09-13T07:37:27Z
Thanks for the feedback!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Nvious1
2017-08-17T18:02:04Z
Originally Posted by: Mark Galpin 

Solved this one by adding an extra dependent Event log trigger of type (Visual Cron job completed successfully) to the task. I set the wait period to a finite 1 hour for the dependency between triggers which takes care of the problem of checking job completed today.



I have a similar situation I need to come up with a solution on and I don't quite follow what you did. I have 2 manually executed jobs but the second one must check that the first one completed successfully within a rolling 24hr window from one the 1st job last finished. I looked into the event trigger - visualcron Job complete successfully but in my testing that just has the job automatically run on a successful run of the job you are watching and I need a manual execution. So like you, I went down the condition road and the variables seem to be the most likely option but the data type of date is not there to do a proper compare. Before I dive-in and roll my own .net method to do this, any other way anyone has figured out to have a date compare condition against a last job execution value?
Scroll to Top