O'Reilly logo

Core PHP Programming: Using PHP to Build Dynamic Web Sites by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required