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

Frederik Löw

06/14/2023, 8:10 PM
Hey folks, I am having a very simple schedule defined like this :
Copy code
@schedule(job=partitioned_data_job, cron_schedule="0 0 * * *",
          default_status=DefaultScheduleStatus.RUNNING)
def sophia_1_schedule(context: ScheduleEvaluationContext):
    partitions = sophia_assets_partition.get_partition_keys()

    # scheduled_date = context.scheduled_execution_time.strftime("%Y-%m-%d")
    for part in partitions:
        yield RunRequest(run_key= part, partition_key= part)
From what I think, this schedule should be set to running by default. But it doesn't as you can see in the picture. I have searched the doc and also a github issue https://github.com/dagster-io/dagster/issues/4103. What am I missing here? I am using dagster 1..3.4
o

owen

06/14/2023, 11:30 PM
hi @Frederik Löw! is it possible that you at some point manually stopped this schedule? the DefaultScheduleStatus gets overridden by any manual action that the user has taken, so once you've turned it off through the UI it won't automatically turn back on
f

Frederik Löw

06/15/2023, 12:32 PM
Hi @owen, thanks for the tip. Unfortunately, that is not the problem. I have just made sure by restarting dagster and dagit - the schedule is still turned of by default. Interesting is, that I have a sensor, that I can set to running by default, with the same logic, just fine.
o

owen

06/15/2023, 4:39 PM
just to be clear, I believe the expected behavior is that, once any manual action is taken to set the status of the schedule, that will override the default status regardless of if you restart the daemons or not. so turning the schedule off, then restarting dagit / dagster daemons would still be expected to keep the schedule off
f

Frederik Löw

06/15/2023, 7:46 PM
You are right! I deleted all the entries of the dagster home folder in my local testing and then restarted with "dagster dev" and the schedule is indeed running by default. Thank you very much for your help!
3 Views