0
我试图通过删除job
停止运行apscheduler并完全关闭它!蟒蛇apscheduler不关闭
他们没有工作,我的功能expire_data
仍然被触发
def process_bin(value):
print "Stored:",pastebin.value
print "Will expire in",pastebin_duration.value,"seconds!"
if pastebin_duration>=0:
scheduler = BlockingScheduler()
job=scheduler.add_job(expire_data, 'interval', seconds=5)
scheduler.start()
job.remove()
scheduler.shutdown()
def expire_data():
print "Delete data!"
我怎么能阻止它?
请标记*无论*蟒蛇2或3 – tambre
对不起,固定,Python 2.7版! –
您能否粘贴一个可以重现问题的完整示例? –