No crontab, também tenho:
00 01 * * 1-7 root /usr/bin/sarg -f /etc/squid/sarg-diario.conf -d `(date --date "1 day ago" +%d/%m/%Y)`-`(date --date "1 day ago" +%d/%m/%Y)` Gera a seguinte mensagem:
From root@thor.thor.net Sun Apr 22 01:00:01 2007 Envelope-to: root@thor.thor.net Delivery-date: Sun, 22 Apr 2007 01:00:01 -0300 From: root@thor.thor.net (Cron Daemon) To: root@thor.thor.net Subject: Cron <root@thor> /usr/bin/sarg -f /etc/squid/sarg-diario.conf -d `(date --date "1 day ago" + X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin> X-Cron-Env: <HOME=/root> X-Cron-Env: <LOGNAME=root> Date: Sun, 22 Apr 2007 01:00:01 -0300 /bin/sh: -c: line 1: unexpected EOF while looking for matching ``' /bin/sh: -c: line 2: syntax error: unexpected end of file Quando eu faço esse mesmo comando no PROMPT não dá erro, mas dentro do
crontab, sim.
Como posso resolver esse erro? |