Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个非常基本的 python 脚本,每分钟通过 crontab 运行一次。
剧本
filed = open('test.txt','a')
crontab
* * * * * /to path the file/job.py
它应该可以工作,但我无法看到结果。那么,可能是什么问题?
需要text.txt使用绝对路径打开;crondaemon 可能正在使用与您期望的不同的路径:
text.txt
filed = open('/home/john/Desktop/test.txt','a')