vi /usr/java/restart.sh

#!/bin/bash

/usr/java/apache-tomcat-8.0.45/bin/shutdown.sh

ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -9

/usr/java/apache-tomcat-8.0.45/bin/startup.sh

chmod +x restart.sh

crontab -e -u root

36 20 * * * /usr/java/restart.sh

标签: none

添加新评论