Triggers & Schedules
Databricks · Lakeflow Jobs
Theory
A job's trigger decides when it runs. In the Job details pane, under Schedules & Triggers, click Add trigger and pick a type. Scheduled runs on a time-based schedule, using a simple interval or a Quartz cron expression with a time zone. File arrival starts a run when new files land in a Unity Catalog volume or external location. Table update starts a run when one or more source tables are updated, so downstream work follows the data instead of the clock. Continuous starts a new run as soon as the previous one ends, for always-on streaming jobs. Without a trigger, a job runs only with Run now or from the API.
Example: build_gold runs Scheduled at 0 30 6 * * ? Asia/Kolkata (6:30 every morning IST). A separate job uses File arrival on /Volumes/main/sales/raw/orders/ so new files are processed within minutes.
Why we use it
Fixed schedules either run too early (data not there yet) or waste compute (nothing new arrived). Data-driven triggers start work exactly when inputs change, and cron schedules cover reports that must be ready at a set time.
When to use it
Use Scheduled for time-bound outputs like a 7 AM report. Use File arrival or Table update when timing depends on upstream data. Use Continuous only for streaming jobs that should never stop. Pause a trigger instead of deleting it during maintenance.
How it works
- Open the job → Job details → Schedules & Triggers
- Click Add trigger
- Must output be ready at a fixed time? Yes: Scheduled: set interval or cron and time zone. No: Next question.
- Does the work follow new files or table changes? Yes: File arrival or Table update. No: Continuous for always-on streams.
- Save the trigger and check the next run time
Syntax
UI: Job details → Schedules & Triggers → Add trigger → Trigger type:
Scheduled (interval or Cron syntax + time zone) | File arrival (storage location) |
Table update (tables, any/all updated) | Continuous | Upstream job completion | Model update
Quartz cron: sec min hour day-of-month month day-of-week e.g. 0 30 6 * * ?Example
# In a Declarative Automation Bundle job definition
resources:
jobs:
build_gold_daily:
name: build_gold_daily
schedule:
quartz_cron_expression: "0 30 6 * * ?" # 06:30 every day
timezone_id: Asia/Kolkata
pause_status: UNPAUSED
process_new_orders:
name: process_new_orders
trigger:
file_arrival:
url: /Volumes/main/sales/raw/orders/
refresh_customer_marts:
name: refresh_customer_marts
trigger:
table_update:
table_names: [main.sales.orders, main.sales.customers]
condition: ANY_UPDATEDKey points
- Quartz cron has a seconds field first: 0 30 6 * * ? = 06:30 daily
- Always set the time zone (e.g. Asia/Kolkata) or schedules run in UTC
- File arrival watches a Unity Catalog volume or external location path
- Table update can wait for any or all of the listed tables to change
- Continuous restarts the job after every run, so it suits streaming
- A paused trigger keeps its settings; Run now still works