In defining a schedule, is there a way to specify ...
# announcements
t
In defining a schedule, is there a way to specify which preset to use for a given pipeline?
s
Copy code
def daily_schedule(
    start_date=...,
    pipeline_name="my_pipeline",
    solid_selection=preset.solid_selection,
    mode=preset.mode,
    tags_fn_for_date=lambda: _: preset.tags,
):
def my_daily_schedule(_date):
    return preset.run_config
You can construct a schedule definition using a preset like so
Btw, questions like these are great for our new discussions page: https://github.com/dagster-io/dagster/discussions
t
Roger that, I'll post this there as well so it's more durable.
🎉 1
s
Thanks!
t
I added some clarifying questions as followup if you have a minute to take a look. Thanks for the quick turnaround!
s
Replied!
t
I've got another question related to populating the schedule, do you want me to just add it to that same question, or start a new one? Trying to figure out how to structure my workspace.yaml and issue the appropriate
dagster schedule up
command.
s
Up to you!
Sounds like making a new one would be the best
t
Figured it out. My issue was that I forgot to set DAGSTER_HOME
👍 1
s
Just curious - what was the error?
t
Copy code
dagster schedule up --preview -w /etc/dagster/workspace.yaml --location residential_edx_repository
Usage: dagster schedule up [OPTIONS]

Error: A scheduler must be configured to run schedule commands.
You can configure a scheduler on your instance using dagster.yaml.
For more information, see:

<https://docs.dagster.io/deploying/instance/#scheduler>
s
Sounds like we could do a better job telling you that the missing DAGSTER_HOME env var was the issue
Got it, thanks
Yeah we should first let you know that DAGSTER_HOME is missing
t
I'll finish asking the question and then answer it for posterity since it's already half typed.
s
cc @rex do you want to take a look at this?
s
Thanks!