How to use the Baidu Bae timer task

Source: Internet
Author: User

Recently want to do some of the tasks scheduled to perform certain requests, because it is not Java, can not have the control of permanent memory, PHP do not know how to do Baidu Bae Cloud, find a long time finally I found

Https://cloud.baidu.com/doc/BAE/GUIGettingStarted.html#.E9.85.8D.E7.BD.AEapp.conf

A timed task is done through a shell command.

Configure Crond in the configuration of the project root app.conf to achieve the purpose of the scheduled task by executing the shell

crond:  service:on  crontab:    "*/1 * * * * sh/home/bae/app/do.sh >>/home/bae/lo G/do_err.log"    "*/1 * * * * *python/home/bae/app/test.py >>/home/bae/log/ Test.log"

-"*/1 * * * * * This is a set execution cycle
/home/bae/app/do.sh This file is where you put a. sh file in your project's root directory,
/home/bae/log/do_err.log "This is where the log output is executed.

How to use the Baidu Bae timer task

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.