记录linux设置定时执行python脚本以及输出到指定文件

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

python脚本:

crontab -e
*/5 * * * * python /home/scripts/kobe/notify.py >> /home/scripts/kobe/logForNotify.log 2>&1

 

每5分钟执行一次 /home/scripts/kobe/notify.py

输出内容记录到 /home/scripts/kobe/logForNotify.log

转载于:https://my.oschina.net/xiaozhiwen/blog/1607860

你可能感兴趣的:(记录linux设置定时执行python脚本以及输出到指定文件)