python脚本在crontab ubuntu上不起作用

时间:2020-09-09 15:50:49

标签: python-3.x cron cron-task

这是我的crontab,我需要它每5分钟运行一次。

*/5 * * * * /usr/bin/python3 /home/py/Desktop/automation/cron.py

我不明白为什么它不运行

这是cront.py文件

import random

name = random.randint(44,4400)

with open(str(name) + '.txt', 'w') as f:
    f.writelines('test')

如果crontab崩溃了,那么将会创建一些文件,但不会在那里输出

我没有得到我错过的东西。

有人可以帮助我吗?

0 个答案:

没有答案
相关问题