linux设置自动重启计划任务

linux设置自动重启计划任务,第1张

linux设置开机服务自动启动/关闭自动启动命令 [root@localhost ~]# chkconfig --list 显示开机可以自动启动的服务 [root@localhost ~]# chkconfig --add *** 添加开机自动启动***服务 [root@localhost ~]# chkconfig --del *** 删除开机自动启动...

开机启动的话可以配置/etc/rc.local文件,把启动apache服务的命令写到rc.local里,

比如echo

"/etc/init.d/httpd

start"

>>

/etc/rc.local

也可以把在对应的运行级别里创建apache服务启动脚本的链接。

确保以下3种问题已解决:

crond 已经开启(检测方法,service crond status;开启方法, service crond start)

脚本有可执行权限

写脚本的绝对路径


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/8680714.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-19
下一篇2023-04-19

发表评论

登录后才能评论

评论列表(0条)

    保存