apscheduler: AndTrigger does not work

Hi Here is part of the code, but the scheduler does not work And the example from the documentation also does not work.

from apscheduler.schedulers.blocking import BlockingScheduler
from apscheduler.triggers.interval import IntervalTrigger
from apscheduler.triggers.cron import CronTrigger
from apscheduler.triggers.combining import AndTrigger
scheduler = BlockingScheduler()
trigger_day = AndTrigger([IntervalTrigger(minutes=2), CronTrigger(hour='7-22')])
scheduler.add_job(job, trigger_day, max_instances=3, id='test')
scheduler.replace_existing = True
scheduler.start()

What am I doing wrong?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 17 (11 by maintainers)

Most upvoted comments

A bit after I wrote my previous comment I ended up attempting to fix this just like your first suggestion but I haven’t got it to work yet.

It seems that this AndTrigger can never find a next fire time. This is a bug.