centos自启动python

2021-06-09  本文已影响0人  逍遥_yjz

一 自定义开机程序

1.打开文件

vim /etc/rc.d/rc.local

2.在文件末尾添加启动命令,自启动

/usr/local/python3.6/bin/python3 /home/test.py > /home/yuhai/log.log 

二 定时启动脚本

五、重启下机器

试试:reboot
以上运行命令,都是绝对路径。

https://www.cnblogs.com/xiaozao/p/9264037.html
https://blog.csdn.net/weixin_43279032/article/details/85619969
https://blog.csdn.net/weiqianglg/article/details/109974714
https://blog.csdn.net/weixin_40361868/article/details/91347252
https://blog.csdn.net/weixin_33733810/article/details/89783388

上一篇 下一篇

猜你喜欢

热点阅读