is there a way to set that in cpanel?
or i have to ssh?


By CPanel I guess you mean DreamHost’s Control Panel (they are not using CPanel, but their own custom built control panel)?

Anyway, you have to set your cronjobs via ssh at DreamHost.

[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM


This Wiki Article should be of some help. I just revised it a little so things are hopefuly a little clearer.



The Wiki article is great, but I’m not totally clear on where my crontab file needs to be saved in order to ensure that it actually gets executed. I have to assume that my default folder under /tmp is incorrect.


The ‘crontab’ command command listed in the Wiki will save the cron file in its proper location. There’s no need to tell it where.



When I saved mine, it defaulted to /tmp/crontab.NIK3Db/crontab, and the tasks I defined did not appear to run. Does this indicate a syntax problem in my cron file itself, or this is not a good location?


I think that’s a temp file the editor uses, but the real file does get saved.
Do a ‘crontab -l’ to see what’s in your crontab file.

If crontab -l does show that you have commands in there and are still having problems, post the text of the file here so we can look for errors.



Do managed web hosting (shared) users get access to setting up cron jobs? I need to set one up to run a blog aggregator script every hour (no, it’s not shady. It’s me and two friends trying to get entries from each of our blogs on the front page of a single blog, while maintaining our independence).



[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM


Here is what I have currently. These commands do work when I run them manually over SSH (removing the portion before perl first).

[i]0 3 * * * perl /home/EXAMPLEUSER/awstats/tools/ -config=EXAMPLESITE1.COM -update -awstatsprog=/home/EXAMPLEUSER/awstats/ -dir=/home/EXAMPLEUSER/EXAMPLESITE1.COM/awstats/

15 3 * * * perl /home/EXAMPLEUSER/awstats/tools/ -config=EXAMPLESITE2.COM -update -awstatsprog=/home/EXAMPLEUSER/awstats/ -dir=/home/EXAMPLEUSER/EXAMPLESITE2.COM/awstats/

30 3 * * * perl /home/EXAMPLEUSER/awstats/tools/ -config=EXAMPLESITE3.COM -update -awstatsprog=/home/EXAMPLEUSER/awstats/ -dir=/home/EXAMPLEUSER/EXAMPLESITE3.COM/awstats/[/i]


Use a full path for perl: /usr/bin/perl



Literally, like this? No worky. (Please forgive my infantile Linux/Unix knowlege).

[i]0 * * * * /usr/bin/perl /home/EXAMPLEUSER/awstats/tools/ -config=EXAMPLESITE1.COM -update -awstatsprog=/home/EXAMPLEUSER/awstats/ -dir=/home/EXAMPLEUSER/EXAMPLESITE1.COM/awstats/

15 * * * * /usr/bin/perl /home/EXAMPLEUSER/awstats/tools/ -config=EXAMPLESITE2.COM -update -awstatsprog=/home/EXAMPLEUSER/awstats/ -dir=/home/EXAMPLEUSER/EXAMPLESITE2.COM/awstats/

30 * * * * /usr/bin/perl /home/EXAMPLEUSER/awstats/tools/ -config=EXAMPLESITE3.COM -update -awstatsprog=/home/EXAMPLEUSER/awstats/ -dir=/home/EXAMPLEUSER/EXAMPLESITE3.COM/awstats/[/i]


After you save and exit from editing your cron file, what message do you get? A success message, or something about the time being wrong?



If you cut and paste the commands with the full path, does it work?

Did you type in ‘crontab -l’ to see if you actually have a crontab file?



After editing I get prompted to save, choose yes, get prompted for filename to write (/tmp/crontab.ld88he/crontab) and it saves w/o a problem (‘installing new crontab’).

If I copy and paste the commands it executes fine (the real commands contain real paths/users).

If I type in ‘crontab -l’ it does display the same commands as what I see in the editor (‘crontab -e’).


I believe that there’s an error with your user’s setup. It seems everthing is in working order.

However, you should do a few final steps before contacting support. First off put this at the top of your cron file

This will send any error messages you might be getting to your E-mail address. Also, make sure there is at least one blank line at the bottom of your cron file. With these things in place, and if you’re sure it’s not running - then contact support.

On a side note, there’s a easier way to get your commands to run every 15 min besides putting in a new entry. for instance:
*/15 * * * * /usr/bin/perl …

Will run your command every 15 min. You can also list min if you’d prefer:
2,8,29,45,51 * * * *

Same goes for all the other fields, if you want specific days or whatever.



I don’t use a MAILTO just because I don’t want to hear back from cronjobs.

Does the blank line at the end screw up the whole crontab, or just the last entry?

The crontab this person is setting up is to run awstats on three different domains, hence the three entries.



That’s fine once you have them working - but expecially in a situation like this you’d want to know what kind of an error message you’re getting.

You should have a blank line at the end, as I’ve heard from others on this forum it seems it’s necessary.

Didn’t catch the different domains.



Thank you for the suggestions. You’ve all been extremely helpful.

When I attempt to add the MAILTO to the start of the file (exactly as you showed, with my own address) I get an error upon saving:

“crontab: installing new crontab
”/tmp/crontab.KnLRmM/crontab":0: bad minute
errors in crontab file, can’t install.
Do you want to retry the same edit?"


sorry, that should be

Also, I’m not sure, but it may have to be an E-mail address hosted by dreamhost.