Timed call scripts to complete a specific business

Source: Internet
Author: User

#/bin/sh# requires the HTTP service address serviceurl= "Http://XXX.XXX.XXX.XXX:8080/p2p/loanCheck/dealFlowLoan" #服务名称 through timed calls, For convenient generation of the corresponding log file servicename= "Dealflowloan" #获取当前目录路径filepath =$ (CD "$ (dirname" $ ")"; pwd "#wget产生的临时文件存放目录tmpfile =" $ filepath/$serviceName. tmp #wget command execution details command= ' wget-o ' $tmpfile "$serviceUrl" '; #执行wget命令echo $command # Writes the contents of the temporary file to the log records echo "$ (date" +%y-%m-%d%h:%m:%s ") $ (cat $tmpfile)" >> $filepath/$serviceName. log############# ################################################################### Deployment notes: # 1. Place the file in a directory on the server and set it to executable. (chmod +x./bulkloanflow.sh) # 2. Edit the/etc/crontab file and add a line of code as follows: (file placed in/root/ws directory) #*/1 * * * * root/root/ws/ bulkloanflow.sh# 3. Execute command: Service Crond restart#################################################################### ###########


Call scripts regularly to complete a specific business

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.