mymyhope 大佬有话说 :
Debian10如何开机自启shell脚本?Debian10没有rc.local了
谷歌也谷歌不到 百度也没有答案?????
打的Debian10 要怎么开机自启shell?
update-rc.d试过了 无效
kzklot 大佬有话说 :
本帖最后由 kzklot 于 2020-2-1 23:53 编辑
安裝….cron….這個是定時執行的…不知道合適使用與否….yc022t
apt-get update &&
apt-get install cron -y &&
systemctl start cron &&
systemctl enable cron
crontab -e
0 * * * * /etc/xxx.sh
時間如何設定可參考
https://crontab.guru/every-1-hour
一位不知名网友 大佬有话说 :
是吗 那太香了
萌䒤萌 大佬有话说 :
systemd了啊,自己新建个服务啊
HaoLan 大佬有话说 :
systemd,在/lib/systemd/system里面添加一个.service,然后systemctl enable xxx,就是这么简单
capric 大佬有话说 :
使用oneshot类型系统服务
Type=oneshot
如果有更进一步要求可以参考下这个:
https://unix.stackexchange.com/questions/320400/systemd-oneshot-requirement-to-execute-only-once
h2o 大佬有话说 :
crontab @reboot