https://dagster.io/ logo
Title
s

Serge Smertin

06/24/2021, 7:35 PM
Hello, i cannot get schedules to work. No matter what i try, the daily schedule gets skipped.
@solid
def just_run(_):
    <http://_.log.info|_.log.info>(f'Just run....')

@pipeline(mode_defs=[ModeDefinition(
    resource_defs={'io_manager': fs_io_manager}, 
    executor_defs=[multiprocess_executor])])
def dummy():
    just_run()

@daily_schedule(
    pipeline_name=dummy.__name__,
    start_date=datetime.datetime(2021, 6, 24),
    execution_time=datetime.time(21, 32),
    should_execute=lambda _: True,
    # should_execute=lambda _: datetime.today().weekday() < 5,
    execution_timezone='Europe/Amsterdam')
def daily(date):
    print(f'Daily stuff... {date}')
    return {}
latest tick is always skipped and daemon is telling
2021-06-24 21:32:29 - SchedulerDaemon - INFO - Evaluating schedule `daily` at 2021-06-24 21:32:00+0200
2021-06-24 21:32:29 - SchedulerDaemon - INFO - No run requests returned for daily, skipping
what is wrong?...
1
@daniel is it something simple?..
d

daniel

06/24/2021, 8:31 PM
I think if you set your start_date one day earlier it will work: https://docs.dagster.io/concepts/partitions-schedules-sensors/schedules#partition-based-schedules (see the part about partition_days_offset - your 06-24 partition executes on 06-25, and that's the first partition)
1
s

Serge Smertin

06/24/2021, 9:28 PM
@daniel perfect, thank you!