Hello, I am trying to define a scheduler. ```sync_...
# announcements
s
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
Hi Spandan - happy to help with this, I think your message was cut off partway through though?
m
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
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
Thanks for the reply. I used run_config in my definition and it worked.