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.

LookupError: No trigger by the name "interval" was found

See original GitHub issue

Originally reported by: Rodrigo Brim (Bitbucket: rodrigo_brim, GitHub: Unknown)


Hello.

I’m getting this error with OSX 10.9.4. The following lines describes my problem. Sorry if this is a stupid post.

#!bash

rbr:python rodrigo$ pip list | grep -i apscheduler
APScheduler (3.0.1)

rbr:python rodrigo$ cat ./schedule.py

#!python

#!/usr/bin/python
from datetime import datetime
import os

from apscheduler.schedulers.blocking import BlockingScheduler

def tick():
    print('Tick! The time is: %s' % datetime.now())

if __name__ == '__main__':
    scheduler = BlockingScheduler()
    scheduler.add_job(tick, 'interval', seconds=3)
    print('Press Ctrl+{0} to exit'.format('Break' if os.name == 'nt' else 'C'))

    try:
        scheduler.start()
    except (KeyboardInterrupt, SystemExit):
        pass
#!bash

rbr:python rodrigo$ ./schedule.py 
Traceback (most recent call last):
  File "./schedule.py", line 14, in <module>
    scheduler.add_job(tick, 'interval', seconds=3)
  File "/Library/Python/2.7/site-packages/apscheduler/schedulers/base.py", line 330, in add_job
    'trigger': self._create_trigger(trigger, trigger_args),
  File "/Library/Python/2.7/site-packages/apscheduler/schedulers/base.py", line 782, in _create_trigger
    return self._create_plugin_instance('trigger', trigger, trigger_args)
  File "/Library/Python/2.7/site-packages/apscheduler/schedulers/base.py", line 766, in _create_plugin_instance
    raise LookupError('No {0} by the name "{1}" was found'.format(type_, alias))
LookupError: No trigger by the name "interval" was found
rbr:python rodrigo$

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:26 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
agronholmcommented, Mar 27, 2016

Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):


Give the instantiated trigger as the second parameter to add_job(). See http://apscheduler.readthedocs.org/en/latest/modules/schedulers/base.html#apscheduler.schedulers.base.BaseScheduler.add_job for further details.

0reactions
agronholmcommented, Sep 11, 2020

Have you restarted the kernel after the restart? That could be your problem

Uh, what?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No trigger by the name "interval" was found - Stack Overflow
This issue is caused by an old version of setuptools.
Read more >
APScheduler:LookupError:No Trigger by the name "interval" is ...
APScheduler:LookupError:No Trigger by the name "interval" is found Environment python:2.6.6pyinstaller:2.1Apscheduler: The Beginning is ...
Read more >
apscheduler/Lobby - Gitter
while adding a job using add_job with 'cron' trigger got following error any ... LookupError: No trigger by the name "cron" was found...
Read more >
fastapi apscheduler: No trigger by the name “interval“ was found
尝试在fastapi 中使用apscheduler 报错:. LookupError: No trigger by the name "interval" was found. 解决办法:使用实例化的trigger.
Read more >
Apscheduler 3.0.0 with PyInstaller - Google Groups
LookupError : No trigger by the name "cron" was found. Any one can help me ? my source code here: sched = BackgroundScheduler(daemon=False)...
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