AragonSnow / aragonsnow.github.io.gitalk

Creat for aragonsnow.github.io's gitalk
0 stars 0 forks source link

linux下使用crontab运行Python脚本的坑 #15

Open AragonSnow opened 4 years ago

AragonSnow commented 4 years ago

https://hexo.aragon.wang/2019/08/26/linux%E4%B8%8B%E4%BD%BF%E7%94%A8crontab%E8%BF%90%E8%A1%8CPython%E8%84%9A%E6%9C%AC%E7%9A%84%E5%9D%91/

在使用Python脚本实现DDNS功能时发现并没有定时运行,在指令后面添加 >/dev/null 2&>1指令,发现如下报错 00-18-01 Traceback (most recent call last): File "/home/c2/DDNS/run.py", line 21, in <module> import requests Impor