![]() |
Missing "&" in the cron ? - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Missing "&" in the cron ? (/thread-2454.html) |
Missing "&" in the cron ? - FeG - 02-15-2008 09:44 PM Hi.. I've got a question related to this ticket (created by BeNe): After upgrading from RC2c to RC3 (and activating AWStats thereby), I get mails like this every 30min: Quote:Subject: Cron <root@hostname> /var/www/ispcp/engine/traffic/ispcp-vrl-traff >/var/log/ispcp/ispcp-vrl-traff.log The domain mentioned there isn't always the same, there are even sometimes different domains occuring in one mail. Furthermore I don't get such a mail every 30min, but mostly. My question is: Is this behaviour normal and there is - as stated by BeNe in the ticket - only a "&" missing to suppress the errors or is something wrong with my logfiles? Thanks in advance, FeG RE: Missing "&" in the cron ? - joximu - 02-15-2008 09:53 PM Normally you put a & after a command to get back to the shell and letting the command run "in behind"... I wrote something in the ticket - I think the & are not needed. You should look at the log files mentioned in the message... RE: Missing "&" in the cron ? - FeG - 02-15-2008 10:12 PM joximu Wrote:Normally you put a & after a command to get back to the shell and letting the command run "in behind"... That's korrekt, if it's only a &, but &> means something else: It redirects stdout and stderr (output and error-output) to the given file. (see http://www.faqs.org/docs/Linux-HOWTO/Bash-Prog-Intro-HOWTO.html#ss3.6) Therefore, maybe it is missing at this point. Quote:You should look at the log files mentioned in the message... The error is No such file or directory - so it'll be difficult to look at the log files ![]() Greetings FeG RE: Missing "&" in the cron ? - joximu - 02-15-2008 10:19 PM ok, just learned something :-) so it's more or less an abbr. for command > ... 2> .... or command 1> ... 2> .... thanx - I never used this syntax. But it should not cause any problems - the only thing: errorr are mailed instead of logged... /J RE: Missing "&" in the cron ? - FeG - 02-15-2008 10:48 PM joximu Wrote:But it should not cause any problems - the only thing: Sure it doesn't cause problems, but my question was if these errors I quoted above are normal behaviour. I guess they aren't, because otherwise there'd be some posts about this problem here... So does anyone knows what causes this problem? Greetings FeG RE: Missing "&" in the cron ? - joximu - 02-15-2008 11:37 PM Maybe there is not traffic at all for some domains - then there may be no log file (just an idea). If you add the & just before the > then you won't see theese messages. of course: the diff command should not be executed if the mv was not ok... ![]() RE: Missing "&" in the cron ? - FeG - 02-18-2008 06:33 PM Does anybody can verify that this is normal behaviour so there's nothing wrong with adding "&>" to this line? RE: Missing "&" in the cron ? - FeG - 02-18-2008 06:51 PM I've just detected another problem connected with this: The daily cronjob causes an error, sent to me by mail: Quote:error: error running prerotate script for /var/log/proftpd/ftp_traff.log, leaving old log in place The log-rotation for ftp_traff.log is defined as follows: Code: /var/log/proftpd/ftp_traff.log { So here is ispcp-vrl-traff also called without an & .. Again my question: Is it normal that this script causes errors (i.e. if, as joximu said, a domain hadn't caused any traffic this day) or is there a problem with my logfiles? Greetings FeG RE: Missing "&" in the cron ? - FeG - 02-20-2008 10:37 PM Can anyone check this with his installation? I'm sure I'm not the only one having domains on my system that perhaps doesn't cause traffic one day. RE: Missing "&" in the cron ? - Cube - 02-20-2008 11:49 PM I have such domains, but I don't get this error. |