How do I schedule an interval job with APScheduler?

后端 未结 5 2046
情话喂你
情话喂你 2020-12-19 05:32

I\'m trying to schedule an interval job with APScheduler (v3.0.0).

I\'ve tried:

from apscheduler.schedulers.blocking import BlockingScheduler
sched =         


        
5条回答
  •  旧时难觅i
    2020-12-19 05:52

    Ok, I've looked at the updated question.

    The reason you're having problems may be that you could be using the wrong timezone. Your country is currently using daylight saving time in most locations, so the correct timezone would probably be MDT (Mountain Daylight Time). But that will break again when you move back to standard time. So I advise you to use a timezone like "America/Denver". That will take care of the DST switches.

    Question: Are you using CentOS? So far it's the only known operating system where automatic detection of the local timezone is impossible.

提交回复
热议问题