Ask AI

You are viewing an unreleased or outdated version of the documentation

Schedules#

Schedules are Dagster's approach to imperative automation. Schedules specify a fixed time interval at which to conditionally execute a target. Some example time intervals expressible with a schedule are daily, hourly, or Monday at 9:00 AM.

Each interval of a schedule is called a tick, which is an opportunity for one or more runs to be launched. Ticks kick off runs, which either materialize a selection of assets or execute a job.

When viewing a schedule in Dagster's UI, you can see the schedule's definition, executing timezone, target, and tick/run history.


Benefits#

Using schedules helps you:

  • Predictably process and deliver data to stakeholders and business-critical applications
  • Consistently run data pipelines without the need for manual intervention
  • Optimize resource usage by scheduling pipelines to run during off-peak hours

Prerequisites#

Before continuing, you should be familiar with:


How it works#

Schedules launch runs at fixed time intervals and have two main components:

  • A target, which specifies a selection of assets to materialize or a job to execute

  • A cron expression, which defines when the schedule runs. Simple and complex schedules are supported, allowing you to have fine-grained control over when runs are executed. With cron syntax, you can:

    • Create custom schedules like Every hour from 9:00AM - 5:00PM with cron expressions (0 9-17 * * *)
    • Quickly create basic schedules like Every day at midnight with predefined cron definitions (@daily, @midnight)

    To make creating cron expressions easier, you can use an online tool like Crontab Guru. This tool allows you to create and describe cron expressions in a human-readable format and test the execution dates produced by the expression. Note: While this tool is useful for general cron expression testing, always remember to test your schedules in Dagster to ensure the results are as expected.

For a schedule to run, it must be turned on and an active dagster-daemon process must be running. If you used dagster dev to start the Dagster UI/webserver, the daemon process will be automatically launched alongside the webserver.

After these criteria are met, the schedule will run at the interval specified in the cron expression. Schedules will execute in UTC by default, but you can specify a custom timezone.


Getting started#

Check out these guides to get started with schedules:

From here, you can:

Limitations and notes#