airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Scheduling frequency

Open dirkgently007 opened this issue 11 years ago • 1 comments

Is there a way to schedule jobs/dags on specific time of the day? Also, on a related note, can DAGs be scheduled on some other frequency - such as hourly, weekly etc?

Apologies if I missed it in the documentation.

dirkgently007 avatar Jun 05 '15 19:06 dirkgently007

Check out the DAG's schedule_interval parameter, it receives a python datetime.timedelta object: http://pythonhosted.org/airflow/code.html#airflow.models.DAG

I believe at the moment heterogenous schedules within a DAG are not supported, but it should be easy to restore (used to work).

We tend to use sensors to wait for actual files to land in HDFS / S3 or partitions to land in Hive, but it's also possible to wait for a specific time using a TimeSensor, which shows up as any other node in the DAG. http://pythonhosted.org/airflow/code.html#airflow.operators.TimeSensor

mistercrunch avatar Jun 05 '15 22:06 mistercrunch