Setting up an hourly cron job


Hi thank you for your help.

I am trying to set up a cron job to run a script on my site every hour. This is what it looks like:
0 * * * * /usr/bin/curl -I “

but this does not seem to work.

Would you please let me know what I am doing wrong or any alternatives?

Thank you.


Your time is set wrong. See the wiki article on crontab.

–Matttail - personal website


Thanks for your speedy response.

Example 4 on the page you referred me to has the same configuration for an hourly update as my code as far as the code for time is concerned.
That is: 0 * * * * for hourly updates.

Would you please let me know what you mean by “Your time is set wrong.” Thank you again for your help.


maybe there’s an error…

you could take a look at /MailDir/New/ and open the recent ones in a Rich text editor (i use DreamWeaver)


Sorry. Apparnetly what I ment was, I’m being stupid and not thinking clearly. Your time is set just fine.

Are you running a file that’s hosted here at dreamhost, or on some other server?

An other easy method ot get error messages back from cron to place this:
at the top of your cron file.

–Matttail - personal website


Have you tried running that command manually from the command line?

And why just the -I? It’s possible this is the culprit, as it doesn’t pull down the whole file. Maybe that doesn’t matter, but I’d drop the -I and pipe the whole thing to /dev/null

0 * * * * /usr/bin/curl “” > /dev/null 2>&1



Thank you for all your help.
I have taken you advice on board.

Here is the process I am using.
I set up an email account:

This is what I wrote in my cronjob file

0 * * * * /usr/bin/curl -I “

I saved this in notepad and called the file “a.txt”

I FTPed this file, a.txt, to the root of my DH domain.

I logged into my domain using shell

I ran the command: crontab a.txt

To check that it is running I ran the command: crontab –l which generates this:

0 * * * * /usr/bin/curl -I " "[doheny]$

However the cronjob is still not running and I am not getting any error messages at

Can anyone please tell me where I am going wrong in this process?
Thank you again for all your help.


Ah! Add a blank line to the end of that crontab file.



Thank you all for your advice and your patience the cronjob is now running correctly.
To think it was a blank line holding me up all this time.
I’m glad it is sorted.

Now let me go and try to sort out my .htaccess conundrum!