Use PHP to do timer code (1/4)

Source: Internet
Author: User

Under Linux, you can use the Crontab + PHP tutorial approach:

1. Use Crontab–e to edit timed tasks

Content is:

XX:XX:XX executes a test.php file

2, the PHP file must be in the first line of the file, plus the interpreter path (as Perl did)

#!/usr/local/bin/php

The execution of PHP requires Apache support, the execution of the shell script requires Linux support, and Linux supports the ability to run a program on a regular basis.

---------------------------------------------------------------

Use PHP as a Shell scripting language (reprint)

--English Original: Darrell Brogdon, published in Http://www.phpbuilder.com/columns/darrell20000319.php3)

Many people may have wanted to use PHP to write some of the regular mail, such as the program, but there is no way to execute PHP on a regular basis; when I went to Phpbuilder, I found this article, so I want to give you a translation (at the same time make some changes), I hope to be useful.

----------------------------------------------------------------------------------

Home 1 2 3 4 last page

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.