Ubuntu定时器备忘

sudo crontab -e 编缉
sudo crontal -l 查看配置
service cron status start stop restart 重启生效
*/10 * * * *  /home/mode1/kwctimer/startkwctimer.sh

sudo apt-get install gnome-schedule

https://help.ubuntu.com/community/CronHowto

startkwctimer.sh 注需先切换到jar目录下先
cd /home/mode1/kwctimer/ /opt/jdk/bin/java -jar kwctimer.jar -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 >>/dev/null & echo $! > java.pid

 

猜你喜欢

转载自jadeluo.iteye.com/blog/2308390