#!/bin/bash is supposed to be aprt of the shell script. That's a file that you create and put on your server (or create through ssh on the server). Then you have crontab excute that.
Let me know if you need more help with this. My inlaws have just been visiting and are leaving tomorrow morning so I'll be around more to help.
In reply to:
putting the database password in plain text in the script has always disturbed me. Until recently, one could view a listing of everybody's processes on the server, which would include commands with password parameters.
If you're sharing your hosting plan with other users, they do have read access to all of your files, so beware of storing plaintext passwords.
Wouldn't the process for this just show up as the cron job, and not the individual parts of the shell script?
And enless you've given out your password for that user, you're the only person who has access to those files. If you're not comfortable giving out the informaiton that the user can access, don't give out it's password.
With the way dreamhost is set up (groups) you don't have to use the same user who has the domain. Just becuase johnny has the FTP/ssh access to example.com, bobby who is an other user under your account can read the files for example.com and of course access the database regardless.
--Matttail
art.googlies.net - personal website