Crontab doesn't seem to work


#1

I’ve been using crontab on my home computer for a while now, but this is the first time I need to use it here. I have a third party script I’m trying that tracks access a little better, so I need it to run every night before the access.log gets rolled over. Here is what my current crontab is:

[code]# Email any output
MAILTO="webmaster@vrillusions.com"

Weblog script 12:01 AM daily

1 0 * * * cd /home/username/mysite.com/cgi-bin/weblog/; perl config.pl
[/code]That mailto I added, to see if it will return any errors and it doesn’t (either that doesn’t work or no errors are generated). and the username is my real name and mysite.com is where my actual website address is. It runs fine if I type that at the command line. I can tell it doesn’t work because the reports generated give a “generated” time and it only changes if I run the command manually and not through crontab. Wanted to see if there was something that I’m missing or something before I contact support about it.


Todd Eddy
vrillusions.com


#2

Hmm, appears to be working now. I just completely cleared out the file and only put that line in there and now it seems to work :-/ ohh well


Todd Eddy
vrillusions.com


#3

We may have fixed it already. Was your machine upgraded recently? For some reason, crontab doesn’t work right when the default editor is vim.

If you notice this again, see if:
export VISUAL=nvi (or pico, nano, or whatever else you want to use)
works. If you use csh or tsch, use:
setenv VISUAL nvi
instead.

If that fixes the problem, contact support and tell them to fix this. We don’t have $VISUAL defined globally, but I believe debian patches stuff to use /usr/bin/editor (which should point to nvi or nano, but sometimes points to vim instead) if $VISUAL or $EDITOR isn’t defined.