测试作业 ID 是否存在 APScheduler
Test if a job id exists APScheduler
除了使用 .get_jobs() 并遍历列表之外,是否有更简单的方法来测试作业 ID 是否存在?
例如:
if schedule.get_job(id='start1'):
do this
你确定你检查过API documentation吗?
所以:
if scheduler.get_job('start1'):
...
除了使用 .get_jobs() 并遍历列表之外,是否有更简单的方法来测试作业 ID 是否存在?
例如:
if schedule.get_job(id='start1'):
do this
你确定你检查过API documentation吗?
所以:
if scheduler.get_job('start1'):
...