Repository navigation
Replies: 1 comment
|
Yes: pass a timetable that carries the timezone as the For example, with the Airflow 3.1.0 API: from airflow.sdk import asset, task
from airflow.timetables.trigger import CronTriggerTimetable
@asset(
schedule=CronTriggerTimetable(
"0 9 * * *",
timezone="Europe/London",
run_immediately=False,
)
)
@task.bash(retries=3)
def example_asset():
return "echo 'run'"This interprets the cron expression as 09:00 Europe/London, including the local daylight-saving offset. The reason this works is that the 3.1.0 asset decorator implementation accepts One semantic distinction matters: This is checked against the versioned source and timetable documentation; I have not run this against your deployment. Drafted-by: Codex (GPT-6) (no human review before posting) |
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to use this example from https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/assets.html#dependency-between-asset-task-and-classic-operators to define an asset together with a BashOperator that creates it:
I'd like to specify a schedule, e.g.
0 9 * * *, with a timezone. In an explicit DAG definition, this could be achieved withhowever
@assetdoes not seem to acceptstart_dateas an argument. Is there another way to achieve this with@asset?All reactions