crontab -e
*/5 * * * * . /etc/profile; . ~/.bash_profile; isfound=$(ps -ef | grep "qixin-entrance-v2021.07.13.jar" | grep -v "grep"); if [ -z "$isfound" ]; then echo "$(date): restart qixin-entrance-v2021.07.13.jar...">>/var/log/restart.log && cd /opt/soft/enterprisedata && ./startup.sh; fi
|