Dreamhost and Cron Jobs

If your web hosting provider is Dreamhost, you can easily set-up a cron job that will make those special PHP scripts of your run.

Here's what worked for me: Use this syntax if you want a certain PHP script run every X minutes:

wget -O /dev/null http://www.example.com/folder/script.php

This assumes that you will use the Dreamhost Panel (nope, it's not cPanel), that you have defined a user which has shell access, and that your cron job will run a maximum of 12 times each hour (or every five minutes).

If you're thinking of running a cron job every minute at Dreamhost, forget it. And if you thought you can define multiple cron jobs and have them run essentially the same command, forget it as well. I'm certain, though, there will be someone who'll figure out how to create cron jobs that run every minute, but think of what the impact will be on the shared server.

Of course, there may be scripts that are lightweight, but do you really need a minute-by-minute cron? Perhaps you should get a virtual private server, or even dedicated hosting.

Anyway, that's what worked for me as far as DH shared webhosting and cron are concerned.

[ First posted on 06/25/2009 by Manuel Viloria ]




  Previous Entry
  Secondthoughts Index
  Next Entry




Get In Touch With Manuel Today

Manuel@Viloria.net

Copyright © 1996 - 2009 by Viloria.com All Rights Reserved.





Secondthoughts @ Viloria.com
"We Host at H4P because H4P is affordable,reliable,
and customer-friendly!"
-- Manuel Viloria


  Viloria.com
  About Manuel Viloria
  Secondthoughts
  Archives
  Angelhouser
  Contact Us
  Privacy Statement
  RSS Feed


  Google Reader