https://dagster.io/ logo
#announcements
Title
# announcements
s

Spandan Pyakurel

12/28/2020, 11:00 AM
Hello, I am trying to define a scheduler.
Copy code
sync_users = dagster.ScheduleDefinition(
        "sync_users", "*/1 * * * *", "sync_users",mode='development')
I was able to provide mode to the definition. However, I am having trouble providing config to the scheduler. Is there any way to do that?
d

daniel

12/28/2020, 2:32 PM
Hi Spandan - happy to help with this, I think your message was cut off partway through though?
m

mrdavidlaing

12/29/2020, 12:51 AM
Can you not just pass a
run_config
? https://docs.dagster.io/_apidocs/schedules#dagster.ScheduleDefinition Eg:
Copy code
sync_users = dagster.ScheduleDefinition(
        "sync_users", "*/1 * * * *", "sync_users",mode='development', run_config={"solids": {"discover_question_solid": {"config": {"answer": 42}}}})
d

daniel

12/29/2020, 1:40 AM
Oh, sorry, I thought it was cut off but now I see the whole message, strange. David's solution/example would work, assuming your run config is static - you can also use the run_config_fn parameter, which lets you pass in a function that's executed to create the run config on each schedule execution.
s

Spandan Pyakurel

12/29/2020, 5:08 AM
Thanks for the reply. I used run_config in my definition and it worked.