After creating some asset definitions, you may want to automate their materialization.
In this guide, we'll show you one method of accomplishing this by using schedules and jobs. To do this for ops, refer to the Automating ops using schedules guide.
By the end of this guide, you'll be able to:
Create a job that materializes assets
Create a schedule
Add the new job and schedule to your project's Definitions object
Next, we'll update our project's Definitions object to include the new job and schedule. This ensures the job and schedule are available to Dagster processes, such as the Dagster UI.
Schedules must be turned on before they can be used. In our case, we already turned the schedule on by using the default_status parameter in its ScheduleDefinition, but there are a few other ways to do this:
Heads up! Starting or stopping a schedule in the UI will override any default status set in code.
To turn on a schedule in the Dagster UI, navigate to Overview > Schedules:
To start and stop schedules via the dagster CLI, use the following commands:
dagster schedule start
dagster schedule stop
Heads up! Starting or stopping a schedule in the UI will override any default status set in code.
You can set the schedule's default status using DefaultScheduleStatus.RUNNING in the schedule's ScheduleDefinition:
After the schedule is started, it will begin executing immediately if the dagster-daemon process is running. This process starts automatically when dagster dev is run.