简体   繁体   English

python script.sh 正在运行或未在门户中签入

[英]python script .sh is running or not check in portal

guys is it possible to check continuously if.sh (any script) file is running or not.伙计们是否可以连续检查.sh(任何脚本)文件是否正在运行。 with portal that monitor.sh services使用 monitor.sh 服务的门户

for example sample test backup.sh service running every 15 minute that take backup in cronjob.例如,示例测试 backup.sh 服务每 15 分钟运行一次,在 cronjob 中进行备份。

mkdir "/dev/my backup directory"
mv /var/log/*2007* "/dev/my backup directory/"
sed -i '/:[0-9][0-5]:/ {d}' "/dev/my backup directory/*"

this is simple test script but is it possible that we can check throw portal that show if service is running or not that send alert if it is stop or started in web-application这是一个简单的测试脚本,但我们是否可以检查显示服务是否正在运行的抛出门户,如果它在 Web 应用程序中停止或启动,则发送警报

if it is possible in python or another language than where i can find useful information.如果可以使用 python 或其他语言而不是我可以找到有用信息的语言。

You can use python-crontab, it may help you Click here你可以使用 python-crontab,它可能对你有帮助点击这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM