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.


unbeatablesale
2020-03-27T20:40:40Z
i have a jobA with 2 tasks and a jobB with 3 tasks;
i need jobA to fully wait untill all tasks are done in jobB, and vice versa also: jobB should fully wait until all tasks in JobA are done;
i can only select one job/task in the conditions , so not sure how to go about this
i can't set multiple conditions for one task
any help appreciated
Sponsor
Forum information
Support
2020-03-31T12:05:21Z
Originally Posted by: unbeatablesale 

i have a jobA with 2 tasks and a jobB with 3 tasks;
i need jobA to fully wait untill all tasks are done in jobB, and vice versa also: jobB should fully wait until all tasks in JobA are done;
i can only select one job/task in the conditions , so not sure how to go about this
i can't set multiple conditions for one task
any help appreciated



How have you set it up right now? You can use VisualCron-trigger for this, Event trigger -> VisualCron. Like this:

https://www.screencast.com/t/r0QCOgopF9v2 

Set that trigger up on both jobs to point at each other's completion
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
bweston
2020-04-03T13:28:02Z
As I have the impression you are talking not about needing to have the jobs constantly take turns running, but about needing neither one to run while the other one is (independently of what triggers them), I will point out that you can set conditions (including that another job is running) at the job level, not just at the task level. I actually have a case I ought to have set up exactly as I think you're describing, but I just realized I've been getting away with having it in only one direction because their schedules and run durations are such that the one without a condition is very unlikely to attempt to run while the other one is in progress.

Also, you can have multiple conditions in a condition set and multiple conditions for a given job or task, which can get pretty complicated; however, conditions and condition sets' existence is at the server level, which can also get confusing - I have condition sets I really need to rename because their existence doesn't make sense unless you look at the job they were originally created for.

It sounds to me as if you might actually be talking about the Flow tab rather than Conditions; Flow tends to be simpler and easier (in my opinion), right up to the point where you need something more complex than Flow can easily handle.

Still, if the condition sets being global is a problem for your use case, you could theoretically have each job start with a task that does nothing of consequence, and give that task an "on complete" flow for "If Other Value" "{JOB(<the other job's id>|Status)}" "Equal" "Running" "Stop Job" as a possible example. I don't really recommend it, though, because it's not an obvious workaround.

...And, all that long-winded stuff being said, if what you actually want is to kick off one of the two jobs and have them both alternate running constantly until one of them fails, but neither one be kicked off any other way, then by all means, the trigger approach should do that just fine.
Support
2020-04-06T12:47:06Z
Thanks for the great input bweston,

unbeatablesale - let us know if you need any more help regarding your question
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top