I don't know why I get this error: ImportError: No module named 'apscheduler'
.
I tried to install the older version with:
sudo pip uninstall apscheduler
and then sudo pip install apscheduler==2.1.2
but this doesn't worked for me.
Here's my code:
import os ,subprocess
from apscheduler.schedulers.blocking import BlockingScheduler
def scheduled_job():
sync_to_drive=subprocess.check_output(["./gdrive", "sync", "upload", "--keep-local", "/home/pi/Documents"], cwd="/home/pi/Downloads")
print (sync_to_drive)
sched = BlockingScheduler()
sched.add_job(scheduled_job, "interval", seconds=5)
sched.start()