On the Developer Tutorials site today, there's a new tutorial posted that walks you through some of the useful features that PHP's CLI functionality can bring to your system administration.
In this tutorial, I'll show you how to use PHP-CLI, the command line interface for PHP, to get your maintenance under control using the technologies you're already familiar with. I'll also examine some of the By the time you've finished this tutorial, you'll be able to build human-assisted backup systems, automatic report generators.
It's a pretty basic introduction that talks about what the CLI environment is and what sorts of things PHP brings to the table. They include some sample scripts to do things like database cleanup and a method for taking in human interaction via the command line.