AsyncIOScheduler weeks работает некорректно?

Сегодня обнаружил что AsyncIOScheduler для weeks=1 срабатывает с пятницы на субботу, а не с воскресенья на понедельник. В чем может быть причина ? Использую python 3.11 и последнюю версию AsyncIOScheduler и все работает на linux. Другие интервалы работают корректно.

Ниже часть рабочего кода. Вроде бы нет возможности принудительно поставить первый день недели - понедельник.

scheduler = AsyncIOScheduler(timezone=str(tzlocal.get_localzone()))

for strategy in get_strategies(self.config):

    timeframe_digits: int = int(strategy['timeframe'][:-1])
    timeframe_letter: str = strategy['timeframe'][-1]

    add_job = functools.partial(
        scheduler.add_job,
        trigger='interval',
        args=[strategy],
        start_date='2000-01-01 00:00:00',
        timezone='UTC'
    )

    match timeframe_letter:
        case 'm':
            add_job(self.processing_orders,
                    minutes=timeframe_digits, max_instances=1000, replace_existing=True, coalesce=True)
        case 'h':
            add_job(self.processing_orders,
                    hours=timeframe_digits, max_instances=1000, replace_existing=True, coalesce=True)
        case 'd':
            add_job(self.processing_orders,
                    days=timeframe_digits, max_instances=1000, replace_existing=True, coalesce=True)
        case 'w':
            add_job(self.processing_orders,
                    weeks=timeframe_digits, max_instances=1000, replace_existing=True, coalesce=True)

Ответы (1 шт):

Автор решения: eri

trigger='interval' у вас же написанно, а 01.01.2000 года – это Суббота. Потому и выполняется в ночь на субботу.

Используй триггер 'cron' добавь время и день недели.

→ Ссылка