Help me setup correct cron job that working

i am confuse where correct tutorial for using cron job, i had looking dreamhost wiki and this forum but i still cannot setup working cronjob

i setup cronjob in dreamhost panel --> goodies --> cronjobs

Command to run : /home/.juice/username/

When to run : Hourly

this is the file that need to call from cron job

<?php $dir = "tmp_cvrt_videos/"; // Files older than this number of hours will be deleted $age = 1; // Hours $threshold_stamp = time() - $age*3600; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if (is_file($dir.$file)) { //echo "$file was last accessed(created): " . date ("F d Y H:i:s", filemtime($dir.$file))."
"; if ($threshold_stamp > filemtime($dir.$file)) { // delete file @unlink($dir.$file); //echo " Delete file: $file
"; } } } closedir($dh); } } else echo "No Files Dir found"; ?>

Try this :

/usr/local/bin/php /home/.juice/username/

Hope this helps.

Get YOUR $50 off on yearly plan and 1 lifetime IP with [color=#CC0000]50AND1LIFETIMEIP [/color] promo code. Sign Up NOW