Skip to main content
Backdrift supports scheduled jobs for recurring tasks like sending reports, cleaning up old data, or syncing with external systems.

Defining Jobs

Describe what should happen and when:
"Run a nightly job to archive completed tasks older than 30 days."
"Every Monday at 9 AM, send a weekly summary email to all users."
"Every hour, check for expiring subscriptions and send reminders."

Schedule Formats

Backdrift understands natural language schedules:
DescriptionCron Expression
”Every day at midnight”0 0 * * *
”Every hour”0 * * * *
”Every Monday at 9 AM”0 9 * * MON
”First of every month”0 0 1 * *
”Every 15 minutes”*/15 * * * *
”Weekdays at 6 PM”0 18 * * MON-FRI

How It Works

  1. Scheduler triggers on the defined schedule
  2. Job Queue ensures reliable delivery
  3. Job Handler executes your logic
  4. Retries if the job fails

Job Features

Reliable Execution

Jobs run exactly once, with automatic retries on failure.

Error Handling

Failed jobs go to a dead-letter queue for debugging.

Logging

Full execution logs available in the Admin Dashboard.

Manual Trigger

Run jobs on-demand from the Admin Dashboard.

Example Jobs

Data Cleanup

"Every night at 2 AM, delete sessions older than 7 days."

Report Generation

"Every Monday at 6 AM, generate a weekly activity report
and email it to organization admins."

External Sync

"Every 5 minutes, sync new orders with the inventory system."

Reminders

"Every day at 8 AM, find tasks due today and send
reminder emails to assignees."

Monitoring Jobs

In the Admin DashboardJobs tab:
  • View all scheduled jobs
  • See last run status and timing
  • Expand to see execution history
  • Click Run Now to trigger manually
  • View logs for each execution

Dead Letter Queue

Failed jobs (after retries) go to a Dead Letter Queue:
  • Jobs are retained for 14 days
  • View failure reason and stack trace
  • Retry or delete from the queue
  • Alert on DLQ depth

Best Practices

Jobs might run twice (rare, but possible). Design for idempotency:❌ “Send email to users” ✅ “Send email to users who haven’t received it today”
Jobs have a 15-minute timeout by default. For longer tasks, use Durable Workflows.
Jobs retry 3 times with exponential backoff. After that, they go to the DLQ.
Jobs run in parallel by default. If you need serial execution, specify it:“Run sequentially to avoid race conditions.”

Event-Driven Jobs

Jobs can also trigger on events, not just schedules:
"When a task is marked complete, notify the project owner."
"When a user signs up, send a welcome email."
These create event-driven triggers instead of scheduled ones.

Durable Workflows

For long-running processes that need to pause and resume.