用于检查tomcat是up还是down以及是否关闭的Shell脚本,然后重新启动它

问题描述 投票:0回答:1

我想写一个脚本并作为一个cron作业运行,它将检查tomcat每小时运行一次,如果发现tomcat停止,它将等待10分钟,然后重新启动它。

bash shell unix devops
1个回答
0
投票

如果您有systemd,请不要使用cron / scripts。检查解决方案:https://unix.stackexchange.com/questions/198444/run-script-every-30-min-with-systemd

© www.soinside.com 2019 - 2024. All rights reserved.