是否有任何内置功能在狂欢或我们只需要定制?
我在contab中添加了以下行
1 * * * * /usr/bin/python /home/prkumar/Desktop/python/sample.py
Run Code Online (Sandbox Code Playgroud)
我的sample.py文件
text_file = open("sample.log", "a")
text_file.write("Hi...")
text_file.write("\n")
text_file.close()
Run Code Online (Sandbox Code Playgroud)
如果我在终端中运行python程序它工作正常,并将文本附加到sample.log文件中.但是如果在crontab中添加程序则没有响应.
谢谢