kiorky / croniter

MIT License
410 stars 40 forks source link

Not Compatible with AWS Cron #18

Closed AchimGrolimund closed 2 years ago

AchimGrolimund commented 2 years ago

sched = '1 3 ? 3,10 SUN *'

this is a valid AWS eventbridge cron image

but Croniter raise this message: "errorMessage": "[1 3 ? 3,10 sun *] is not acceptable",

gives any solution to use croniter with aws eventBridge rules?

here the full code:

    now = datetime.datetime.now()
    sched = '1 3 ? 3,10 SUN *'
    cron = croniter.croniter(sched, now)
    for i in range(4):
        nextdate = cron.get_next(datetime.datetime)
        logger.info(nextdate)

Best regards

kiorky commented 2 years ago

Sorry but i'm afraid croniter mostly stick with UNIX like cron.

You may submit a PR to add the support, through.