I am having following import error
"ImportError: No module named scheduler"
when I run the following python script:
"""
Demonstrates how to use the blocking scheduler to schedule a job that execute$
"""
from datetime import datetime
import os
from apscheduler.scheduler 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
I have installed APS scheduler using: sudo pip install apscheduler
I have also upgraded using: sudo pip install apscheduler --upgrade Also upgraded my system using "sudo apt-get install update && sudo apt-get upgrade"