Domain 4 โ€” Module 3 of 8 38%
23 of 28 overall
Domain 4: Deploy and Maintain Data Pipelines and Workloads Free โฑ ~10 min read

Lakeflow Jobs: Schedule, Alerts & Recovery

Schedule jobs with cron expressions, configure failure alerts, and set up automatic restarts โ€” making your pipelines self-healing.

Scheduling jobs

Simple explanation

Scheduling is setting an alarm clock for your pipeline.

You tell the job โ€œrun every night at 3 AMโ€ or โ€œrun every 2 hours on weekdays.โ€ Databricks uses cron expressions โ€” a standard way to describe schedules.

Common cron patterns

ScheduleCron ExpressionNotes
Every day at 3 AM0 3 * * *Standard nightly ETL
Every 2 hours0 */2 * * *Frequent refresh
Weekdays at 8 AM0 8 * * 1-5Business-hours only
First of every month0 0 1 * *Monthly aggregation

Timezone: Always set the timezone explicitly. โ€œ3 AMโ€ means different things in UTC vs NZST.

Alerts

Configure alerts to notify your team when jobs fail or take too long:

Alert TypeWhen It Fires
On failureAny task in the job fails
On successJob completes successfully
On duration exceededJob runs longer than a threshold
On startJob begins execution

Alerts can notify via: email, Slack, PagerDuty, webhooks, or Microsoft Teams.

Ravi configures failure alerts at DataPulse so the on-call engineer gets a Slack message within seconds of any pipeline failure.

Automatic restarts and retries

Task-level retries

Configure retries for individual tasks that may fail due to transient issues:

SettingPurpose
Max retriesNumber of retry attempts (e.g., 3)
Min retry intervalWait time between retries (e.g., 30 seconds)
Retry on timeoutWhether to retry when a task times out

Pipeline automatic restarts

For Declarative Pipelines, configure continuous mode with automatic restart:

  • Pipeline runs continuously
  • If it fails, it automatically restarts after a configurable delay
  • Ideal for streaming pipelines that must stay running

Job-level recovery

FeatureWhat It Does
Repair runRe-run only the failed tasks (not the entire job)
Max concurrent runsPrevent overlapping runs (default: 1)
TimeoutKill the job if it exceeds a time limit
Question

What are the four alert types for Lakeflow Jobs?

Click or press Enter to reveal answer

Answer

On failure, on success, on duration exceeded, and on start. Alerts can notify via email, Slack, PagerDuty, webhooks, or Teams.

Click to flip back

Question

What is a repair run in Lakeflow Jobs?

Click or press Enter to reveal answer

Answer

A repair run re-executes only the failed tasks (and their downstream dependents) rather than restarting the entire job. Saves time and compute when only one task in a multi-task job failed.

Click to flip back

Question

How do you configure automatic restarts for streaming pipelines?

Click or press Enter to reveal answer

Answer

Set the Declarative Pipeline to continuous mode with automatic restart. If it fails, it restarts after a configurable delay. Essential for streaming pipelines that must stay running.

Click to flip back

Knowledge check

Knowledge Check

Ravi's nightly ETL job at DataPulse occasionally fails on the ingestion task due to a flaky source API. The API usually recovers within a minute. What configuration minimises manual intervention?


Next up: Git & Version Control โ€” Git best practices, branching, and pull request workflows in Databricks.