About adding a crontab task on linux

Source: Internet
Author: User
I want to add a PHP file under homewwwrootmy_domaindomainjingjingjueweb to execute database management. How can I write correctly? I am not very clear about the linux File directory, but I simply printed the directory with df-a. I don't know...

I want/home/wwwroot/my_domain/domain/jingjingjue/web/Add a PHP file to manage the database. How can I write correctly?

  1. I am not very clear about the linux File directory, but it is simple to usedf -aPrinted the directory. I don't know./homeIs it the root path?

  2. Can I put this PHP file here for normal execution? Or is there a specific php Execution path?

Hope you can give me some advice. Thank you ~

Reply content:

I want/home/wwwroot/my_domain/domain/jingjingjue/web/Add a PHP file to manage the database. How can I write correctly?

  1. I am not very clear about the linux File directory, but it is simple to usedf -aPrinted the directory. I don't know./homeIs it the root path?

  2. Can I put this PHP file here for normal execution? Or is there a specific php Execution path?

Hope you can give me some advice. Thank you ~

/homeIt is not the root directory. the root directory of the unix system is/;
As long as your files are executable scripts, theoretically, they can be executed in any directory.

Example: What if you need to merge rows/home/dmtsai/test. sh every five minutes? A: Similarly, use crontab-e to import ingress labels: */5 *****/home/dmtsai/test. sh.

Chapter 3 of the Linux private dish of laruence, crontab)

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.