An interesting trick that I use is having two scripts, one with all the bot code and one script that runs the other script in a loop. This is very good if your bot needs to be run on the hour and it stops the bot code from taking up too much memory.
Chris