apscheduler报警告The localize method is no longer necessary,as this time zone supports the fold attribute (PEP 495)
PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html return tzinfo.localize(dt)
加上时区就好了
scheduler = BlockingScheduler(timezone="Asia/Shanghai")

浙公网安备 33010602011771号