1.编写Python脚本
创建Python文件 test.py
f = open('haha.text','w',encoding='utf-8')
f.close
2.编写shell脚本
创建 myshell.sh 文件
#!/bin/bash
/home/dm2/anaconda3/bin/python3 /home/dm2/thunder_project/thunder_data_post.py
##### Python命令路径 需要执行的Python代码
3.编写定时任务
输入命令 crontab -e
* * * * * /home/myshell.sh >&/home/dm2/thunder_project/error.log
分/ 时 / 天/ 星期 /月 执