Hello there. Got a question about schedules. Curre...
# ask-community
j
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
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
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 😅