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.
----------------------------------------------------------------------------------