Webalizer cron job: need help w setup

software development

#1

I’m trying to follow the directions on these two pages to setup the cron job to run webalizer every night.
http://wiki.dreamhost.com/index.php/Crontab
http://wiki.dreamhost.com/index.php/Webalizer

The commands themselves work from the command line but cron won’t accept them, failing silently from the command line, or giving an error message if I put the commands in a file and try to set it using the ‘crontab’ command.

my current file (.crontab) looks like this:
[color=#CC0000]
00 02 * * * * /home/username/webalizer/webalizer -c /home/username/webalizer/mydomainA.conf >/dev/null 2>&1
00 02 * * * * /home/username/webalizer/webalizer -c /home/username/webalizer/mydomainB.conf >/dev/null 2>&1

[/color]

then if I call “crontab .crontab” i get:
[color=#CC0000]".crontab":0: bad command[/color]

if i try doing:
[color=#CC0000]
crontab -e 00 02 * * * * /home/username/webalizer/webalizer -c /home/username/webalizer/mydomainA.conf >/dev/null 2>&1[/color]

I get nothing and “crontab -l” returns “no crontab for username”

clearly i’m missing somthing here. Can someone set me stright?

Thanks,
Raven

ps. all user and domain names were changed to protect the guilty, I KNOW I need to use my real user and domain names as needed…


#2

I’m no expert, but I’ve edited crontab before successfully. Try doing “crontab -e” all by itself, without specifying the path or filename. That’s what I use, and it calls up my crontab file just fine. I don’t even know where it’s located. Than type in some commands and save, then try “crontab -l” and see if it you have a listing.


#3

thanks for the tip but no dice :frowning:


#4

doh! that counting thing again…
That was it. Thanks!

raven,

ps. One article I read in the wiki suggested using two-digit numbers like “02” vs. “2”, I figured “00” was probably not needed, but it was consistent at least…