https://dagster.io/ logo
#ask-community
Title
# ask-community
j

Jose Uribe

05/12/2022, 5:42 PM
Hello there. Got a question about schedules. Currently we're setting up our schedules like so:
Copy code
import dagster as dst

config = {
    "resources": {
        "slack": ...,
        "values": {
            "config": ...
        }
    }    
}

@dst.schedule(
    cron_schedule="1 4 * * *",
    job=my_job,
    execution_timezone="UTC",
)
def daily_pipeline_exec():
    return config

@dst.repository
def custom_repository():
    return [pipeline_exec, daily_pipeline_exec]
While it seems like our schedules are running at the time they should, it looks like the pipelines don't actually execute. Specifically, it looks like we're getting the following error:
Copy code
Schedule function returned an empty result
Is there anything else i should check to figure out what's causing the pipelines to not start?
y

yuhan

05/12/2022, 7:23 PM
What you have seems right to me - trying to repro on my end
Tried repro it on my end, the code works and successfully trigged a run. this is what i ran:
Copy code
import dagster as dst

# config = {"resources": {"slack": ..., "values": {"config": ...}}}
config = {"ops": {"my_op": {"config": {"a": 1}}}}


@dst.op(config_schema={"a": int})
def my_op(context):
    print(context.op_config)


@dst.job
def my_job():
    my_op()


@dst.schedule(
    cron_schedule="* * * * *",
    job=my_job,
    execution_timezone="UTC",
)
def daily_pipeline_exec():
    return config


@dst.repository
def custom_repository():
    return [my_job, daily_pipeline_exec]
j

Jose Uribe

05/13/2022, 2:12 PM
just wanted to follow up on this thread - it looks like there was just some misconfiguration on our end. thank you for confirming the code was right in your repro though! helped eliminate some possible source of issues.
we perform an environment specific config check, where we look up what config to pull based on an execution environment variable. the variable was incorrect 😅
2 Views