Running a Script Regularly
Both UNIX and Windows NT have facilities for running programs according to a schedule. In UNIX you can edit your crontab file, and in Windows you use the scheduling service. These are useful when you wish to perform some maintenance function as part of your PHP-powered site. You may write a script to download the list of files at the Slashdot site <http://www.slashdot.org/>. Another script might rebuild the index for a local search engine. Both crontab and the scheduling service take a command line and execute it at a given time. If you're not familiar with the details, either read the main page for crontab, or type at /? in a Windows command shell.
You have two choices for invoking a PHP script from the command line. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access