Re: cron no funciona
[SOLUCIONADO]
El cron funciona bien el problema es al nombrar el directorio
segun la siguiente pagina [1] http://en.wikipedia.org/wiki/Crontab
---------------------------------
Another common mistake is to use unescaped % in your command; you have
to escape them:
# Incorrect:
1 2 3 4 5 touch ~/error_`date "+%Y%m%d"`.txt
The daemon emails message with information: /bin/sh: unexpected EOF
while looking for `''
# Correct:
1 2 3 4 5 touch ~/right_$(date +\%Y\%m\%d).txt
# Also correct, with single quotes:
1 2 3 4 5 touch ~/error_$(date '+%Y%m%d').txt
# Overdosed. This touches something like ~/error_\2006\04\03.txt
1 2 3 4 5 touch ~/error_$(date '+\%Y\%m\%d').txt
--------------------------------------------------------
entonces
#vi /etc/crontab
quedando asi:
###############################################
#apagar la pc
# todos los sabados a las 8PM
00 20 * * 6 /sbin/shutdown -h now
#Generar el reporte del proxy squid
#todos los dias a las 11:45
45 23 * * * root /usr/bin/lr_log2report --output html squid_access
/var/log/squid/access.log /var/www/squid/$(date +\%d-\%m-\%Y_\%H-\%M)
#Generar el reporte del cortafuegos
#todos los dias a las 11:55
55 23 * * * root /usr/bin/lr_log2report --output html iptables
/var/log/iptables.log /var/www/cortafuegos/$(date
+\%d-\%m-\%Y_\%H-\%M)
*/5 * * * * root /usr/bin/lr_log2report --output html squid_access
/var/log/squid/access.log /var/www/squid/$(date +\%d-\%m-\%Y_\%H-\%M)
######################################
PD:Gracias a los que hicierón su aporte.
--
visita http://parquesoftibague.com/
juega http://ogame.com.es/
riete http://blog.smaldone.com.ar/2006/12/10/no-tener-ni-idea/
Linux User #449182
Reply to: