Cron jobs (Crontab jobs) trick and tip on DreamHost

Crontab is a utility tool on Unix-like OS that enable you to make a program daemon that’s scheduled to run at a specified interval. For example, to fetch for news feed every hour on the hour.

With DreamHost you can easily add Crontab jobs at their proprietary web panel, but there is 2 tricks.

With PHP, you can specify the version to run the script, PHP4 or PHP5.

PHP4: /usr/local/bin/php

PHP5: /usr/local/php5/bin/php

With a PHP script, you can always achieve the same with lynx -dump command.

Also it’s required to add this line:

#!/usr/local/bin/php -q

at the top before <?php declaration if you are configuring crontab in command line mode rather than add it from the web panel of DreamHost.

1 Comment »

  1. VK Said,

    May 14, 2008 @ 6:21 am

    Hi, read a Dreamhost review by you http://www.dreamhostreviews.com/review/dreamhost/2439.
    I intend to start a website with a forum (say 100 posts a day.) Is it true that I cant host this on a $8/mo package? Are u using the same one or the dedicated one? Thanks

Leave a Comment