0

My DAG is scheduled to run daily at 7 AM. Can I specify time of the day to execution timeout parameter instead of duration.

For example, I want to add specific time 12 PM so that job will fail if it is still running at 12 PM.

y2k-shubham
  • 10,183
  • 11
  • 55
  • 131
Afz Abd
  • 423
  • 3
  • 19

1 Answers1

0

Such a param is not present in BaseOperator or DAG


You'll have a build it. Here's some hint how you can go about it (not certain if this would work)


In case you have to timeout some specific task(s) instead of entire DAG

  • you can change write another custom timesensor that marks a specific task as failed upon timing out.
  • you can wire up this custom timesensor with that task in parallel (so that both the task and it's sensor launch together)
y2k-shubham
  • 10,183
  • 11
  • 55
  • 131