我正尝试在每个星期四的特定时间安排zip存档文件夹,这是我的代码:
def zipdir(path, ziph):
#ziph is zipfile handle
for root, dirs, files in os.walk(path):
for file in files:
ziph.write(os.path.join(root, file))
zipf = zipfile.ZipFile('test_python.zip', 'w',
zipfile.ZIP_DEFLATED)
zipdir('./test_python', zipf)
schedule.every().thursday.at("11:25").do(zipdir) // **here is the error**
while True :
schedule.run_pending()
time.sleep(1)
我收到此错误:第一个参数必须是可调用的, 我该如何解决?