Happy to see you are getting help from blackmonster.
My coding are too dependent of my server setup (cronjob, memcached, php includes, lots of harcodings for my sites... ) so it would be a big job making a generic script out of it, sorry for that. But seems you are already being served by the nice people in this thread.
