This really simple thing took me a little while to figure out, so hopefully step by step instructions here can help others who have the same issues. I wanted to update my Tweet Nest website automatically instead of having to manually run a script each time I wanted to back up my tweets from Twitter (that’s the idea behind Tweet Nest — an off-Twitter archive of your tweets). Here’s how it works with Dreamhost:
After setting up Tweet Nest, run the loadtweets.php script.
At the bottom of the screen that runs the script you’ll find some code that looks like this: php /home/USERNAME/TWEETNESTURL/maintenance/loadtweets.php
Copy it. Obviously instead of USERNAME it’ll have your username and instead of TWEETNESTURL it’ll have the URL where Tweet Nest lives.
Navigate to Goodies, then Cron Jobs in the Dreamhost panel.
Create a new Cron Job with the following settings (also see photo below):
The user has to match the the username from the code you copied from Tweet Nest’s loadtweets.php
page.
Give it a title (I called mine Tweet Nest Update) and an email address to mail output to.
Set Status to Enabled.
For Command to run, paste the following (replacing USERNAME and TWEETNESTURL as above:
/usr/local/php5/bin/php
/home/USERNAME/TWEETNESTURL/maintenance/loadtweets.php
/usr/local/php5/bin/php
/home/USERNAME/TWEETNESTURL/maintenance/loaduser.php
The /usr/local/php5/bin/php
part tells the cron job to use PHP, then the address tells it what script to run.
Leave “Locking” checked and set a frequency. I run mine every hour.
Click edit to save. In an hour (or sooner or later depending on the frequency you set) you’ll get an email telling you whether the script ran or not. If it worked, you’ll get input similar to the input you get when you run the scripts from your browser.