Exception has occurred: TypeError func must be a callable or a textual reference to one

这是python定时器apschedurler的scheduler.add_job(iotmain(), “cron”, hour = 7, minute = 00)语句里面,调用的方法iotmain()不能带(),改写为:scheduler.add_job(iotmain, “cron”, hour = 7, minute = 00),恢复正常,即每天7:00调用方法iotmain()。原因参考此文:https://pdf-lib.org/Home/Details/8447

疑问:带参数的方法怎么定时调用?先把疑问留着,日常有空再查看apschedurler的原文档。https://apscheduler.readthedocs.io/en/stable/

你可能感兴趣的:(python,bug)