1
필자가 파일을 실행하고 실행하면 python 스크립트가 실행됩니다. 그러나 스케줄러가 스크립트를 실행할 때 스크립트가 실패합니다. 무엇이 이것을 일으킬 수 있습니까? PythonAnywhere 스크립트 스케줄러가 작동하지 않습니다.
이
내 스크립트입니다import time
import os
import shutil
import stat
for i in os.listdir():
if os.path.isdir(i):
shutil.rmtree(i)
이다가 스케줄러에 의해 실행 때 내가 오류
Traceback (most recent call last):
File "filepath/myscript.py", line 7, in <module>
for i in os.listidir():
TypeError: listdir() takes exactly 1 argument (0 given)
2017-01-25 17:10:12 -- Completed task, took 0.00 seconds, return code was 1.
임 내가 수동으로 할 때 일정을 실행하지만 때이 작품 왜 혼란 그것을 실행합니다.
https://docs.python.org/2/library/os.html#os.listdir – hashcode55