airflow.providers.standard.sensors.time

Module Contents

Classes

StartTriggerArgs

Arguments required for start task execution from triggerer.

TimeSensor

Waits until the specified time of the day.

TimeSensorAsync

Waits until the specified time of the day.

class airflow.providers.standard.sensors.time.StartTriggerArgs[source]

Arguments required for start task execution from triggerer.

trigger_cls: str[source]
next_method: str[source]
trigger_kwargs: dict[str, Any] | None[source]
next_kwargs: dict[str, Any] | None[source]
timeout: datetime.timedelta | None[source]
class airflow.providers.standard.sensors.time.TimeSensor(*, target_time, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Waits until the specified time of the day.

Parameters

target_time (datetime.time) – time after which the job succeeds

See also

For more information on how to use this sensor, take a look at the guide: TimeSensor

poke(context)[source]

Override when deriving this class.

class airflow.providers.standard.sensors.time.TimeSensorAsync(*, target_time, start_from_trigger=False, trigger_kwargs=None, end_from_trigger=False, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Waits until the specified time of the day.

This frees up a worker slot while it is waiting.

Parameters
  • target_time (datetime.time) – time after which the job succeeds

  • start_from_trigger (bool) – Start the task directly from the triggerer without going into the worker.

  • end_from_trigger (bool) – End the task directly from the triggerer without going into the worker.

  • trigger_kwargs (dict[str, Any] | None) – The keyword arguments passed to the trigger when start_from_trigger is set to True during dynamic task mapping. This argument is not used in standard usage.

See also

For more information on how to use this sensor, take a look at the guide: TimeSensorAsync

start_trigger_args[source]
start_from_trigger = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

execute_complete(context, event=None)[source]

Handle the event when the trigger fires and return immediately.

Was this entry helpful?