简体   繁体   中英

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. with portal that monitor.sh services

for example sample test backup.sh service running every 15 minute that take backup in 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

if it is possible in python or another language than where i can find useful information.

You can use python-crontab, it may help you Click here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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