从apscheduler中的另一个线程中删除/停止运行作业

问题描述 投票:0回答:1

我想终止从另一个线程运行后台作业。我有正在运行的作业的ID,我正在尝试删除使用

sched.remove_job(job_id)

但是得到一个错误:

apscheduler.jobstores.base.JobLookupError: 'No job by the id of createjob1536050551951 was found'

有没有办法从另一个线程终止运行作业?

python-3.x apscheduler
1个回答
0
投票

没有办法强制结束Python中的线程。

© www.soinside.com 2019 - 2024. All rights reserved.