0

Reading the answer in this link https://stackoverflow.com/a/53938833/4187237, I don't get how to import the class

   APScheduler()

Does enyone have any idea on how to do it? I'm looking for somthing like

   from apscheduler import APScheduler
Gigino
  • 341
  • 3
  • 16

1 Answers1

1

I'm not aware of APScheduler as a scheduler type, you can see the list of valid schedulers in the documentation. That answer is a few years old and using APScheduler 3.5.3 whereas the latest stable version is 3.6.3.

Using a BlockingScheduler as an example, you can achieve the desired effect:

from apscheduler.schedulers.blocking import BlockingScheduler

scheduler = BlockingScheduler()

@scheduler.scheduled_job('interval', id="my_job_id", seconds=5)
def test():
    print("Working")

scheduler.start()
Lucan
  • 2,907
  • 2
  • 16
  • 30
  • You are right, the user in the question I was mantioning just invented (don't know why) the class APScheduler and I was really confused by that. – Gigino Jul 01 '20 at 07:57