question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AndTrigger does not work

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
agronholmcommented, Aug 13, 2019

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.

1reaction
agronholmcommented, Jan 25, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

AndTrigger does not work with IntervalTrigger #361 - GitHub
The actual problem is that because IntervalTrigger starts counting from current time, it never agrees with the CronTrigger because CronTrigger never produces ...
Read more >
apscheduler.triggers.combining - Read the Docs
The trigger is considered to be finished when any of the given triggers has finished its schedule. Trigger alias: and. Parameters. triggers (list)...
Read more >
Python Aps Scheduler run in interval between two weekdays ...
trigger1 is executed monday to fri from 0:00 to 19:00 every day (not executed from ... trigger1 = AndTrigger([IntervalTrigger(minutes=1), ...
Read more >
Debugging Job Scheduler and Trigger Problems - Datameer
If you experience the problem that scheduled jobs are not running anymore, but you can run them manually. Step-by-step guide. 1) Add within...
Read more >
Collision and trigger not working and can not detected on ...
Collision and trigger not working and can not detected on mobile device. The collision and trigger worked fine on the game view in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found