Creating a job to re-index all user databases in a Standard Edition instance of SQL Server 2005/2008
Here's another version of the reindex script that supports SQL Server 2005/2008 Standard and Workgroup Editions. It's got the online re-indexing code stripped out. If you're running something else like Workgroup, just change the code that checks for "Standard".
You can download the file attachment to get the script.