https://prefect.io logo
s

sark

09/18/2020, 4:55 AM
hi, what’s the best way to express a job which has to be explicitly started and stopped at specific times, but with other downstream jobs which are supposed to start only once that job has stopped? schedules seem to apply to flows, not tasks but if i separate the starting/stopping into separate flows then i lose the ability to express dependencies
c

Chris White

09/18/2020, 4:56 AM
I recommend using Flow-to-Flow dependencies as described in this example: https://docs.prefect.io/core/idioms/flow-to-flow.html
s

sark

09/18/2020, 5:01 AM
thanks chris, let me try that
👍 1
hmm that doesn’t quite work, because if add schedule to the component flows, then they will execute, independently of the metaflow and there does not seem to be a way to add a schedule to a
FlowRunTask
c

Chris White

09/18/2020, 4:09 PM
Hi Sark, sorry for missing this - another option would be to add a task at the beginning of your scheduled flows that polls the API to wait for the other relevant jobs to complete
s

sark

09/21/2020, 2:55 AM
hmm yeah that would work, and would be the equivalent of this in airflow https://stackoverflow.com/questions/38022323/how-to-set-dependencies-between-dags-in-airflow i guess