LookupError: No trigger by the name "interval" was found
See original GitHub issueOriginally 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:
- Created 9 years ago
- Comments:26 (18 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Uh, what?