Say I've got two scheduled processes: A and B.
Given that B should not run until A has completed, how might I gracefully enforce this dependency?
Approaches that have been considered:
Have A schedule B upon completion. This has the downside of B never being scheduled if for some reason A failed.
When B runs, have it ping A to see if the latter has completed. How this might be accomplished (network, file, database record, message queue) could be messy and problematic introducing a third dependency.
Combine A and B into a single process. This has the downside of tightly binding the two, making it harder to re-run one or the other in isolation if need be.
Thoughts?