Use crontab to schedule and execute the jar program
Source: Internet
Author: User
Use crontab to schedule the execution of jar program scheduling network exception NetworkException. jar package 1. set NetworkException. add the jar package to the/home/lingyh/Public directory. 2. create NetworkException in the same directory. sh, enter the following content in the shell script :...
Use crontab to schedule the execution of jar program scheduling network exception NetworkException. jar package 1. set NetworkException. add the jar package to the/home/lingyh/Public directory. 2. create NetworkException in the same directory. sh, enter the following content in the shell script :#! /Bin/bash cd/usr/local // usr/java/jdk1.6/bin/java-jar NetworkException. jar-cp/usr/java/jdk1.6/lib/tools. jar:/usr/java/jdk1.6/lib/dt. jar :. run/home/lingyh/Public/NetworkException. sh: Check whether the shell script can be executed. 3. execute the cd/etc and crontab-e commands for editing. enter the following content and execute the command every 10 minutes: # NetworkException. jar 0/10 ***/home/lingyh/Public/NetworkException. sh 4. run/etc/init. d/crond restart crontab
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.