Timer code using php (1/4)-PHP source code

Source: Internet
Author: User
Ec (2); in linux, you can use the crontab + php tutorial method: 1. Use crontab & ndash; e to edit the scheduled task content as: xx: xx executes a test. PHP file 2. The php file must be in the first line of the file, with the interpreter path (just like what perl does )#! The execution of usrlocalbinphpphp requires apache support. The execution of shell scripts requires script ec (2) and script

In linux, you can use the crontab + php tutorial method:

1. Use crontab-e to edit a scheduled task

Content:

Xx: xx execute a test. php file

2. The php file must be in the first line of the file with the interpreter path (just like what perl does)

#! /Usr/local/bin/php

Php Execution requires apache support, and shell script execution requires linux support, while linux supports timed running of a program.

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

Use php as a shell scripting language (reprinted)

Darrell brogdon, published in http://www.phpbuilder.com/columns/darrell20000319.php3)

Many may have thought about using php to write some programs such as timed sending, but they cannot execute php on a regular basis. This article was found when I went to phpbuilder once, so I want to translate it for you (and make some modifications at the same time) and hope it will be useful to you.

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

Homepage 1 2 3 4 last

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.