Asi preto, ze ako interpreter je /bin/bash ktory cron nevie najst. Skuste pouzit /bin/sh alebo /usr/local/bin/bash (ak je nainstalovany.)
On 03/30/2012 10:14 AM, Marek Slebodnik wrote: > v jednom pripade som narazil na to, ze sa uloha nevedela spustit , pretoze > bol prekroceny max running process from cron alebo nieco take. Kazdopadne > by som skontroloval cron logy, ci sa to vobec pokusal spustat. > > Dňa 29. marca 2012 8:46, Roman Nádhera <ro...@nadhera.name> napísal(-a): > >> >> Dobry den, >> >> nevimproc mi nechodi uloha z CRONu. >> Jedna se o skript mymail v poslednim radku crontab. >> >> V /etc/crontab je: >>> # /etc/crontab - root's crontab for FreeBSD >>> # >>> # $FreeBSD$ >>> # >>> SHELL=/bin/sh >>> PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin >>> # >>> #minute hour mday month wday who command >>> # >>> */5 * * * * root /usr/libexec/atrun >>> # >>> # Save some entropy so that /dev/random can re-seed on boot. >>> */11 * * * * operator >> /usr/libexec/save-entropy >>> # >>> # Rotate log files every hour, if necessary. >>> 0 * * * * root newsyslog >>> # >>> # Perform daily/weekly/monthly maintenance. >>> #1 3 * * * root periodic daily >>> #15 4 * * 6 root periodic weekly >>> #30 5 1 * * root periodic monthly >>> # >>> # Adjust the time zone if the CMOS clock keeps local time, as opposed to >>> # UTC time. See adjkerntz(8) for details. >>> 1,31 0-5 * * * root adjkerntz -a >>> # >>> 15,45 * * * * root /util/mymail >/dev/null >> 2>&1 >>> >> >> Obsah soubotu /util/mymail je >> >>> >>> #! /bin/bash >>> >>> sysctl -a | grep -e temperature | cut -c 33-50 > /tmp/statmail.txt >>> smartctl -a /dev/ada0 | grep Temper | cut -c 87-90 >> /tmp/statmail.txt >>> echo ====================================== >> /tmp/statmail.txt >>> cp /var/log/apcupsd.status /tmp/apcupsd.status.txt >>> cat /var/log/auth.log | grep -e error -e fail >> /tmp/statmail.txt >>> echo ====================================== >> /tmp/statmail.txt >>> >>> >>> smtpmail -t moje.adre...@xxxx.cz \ >>> -H 192.168.1.1 \ >>> -f yyy...@xxxx.cz \ >>> -s "Persefona server report" \ >>> -a /tmp/apcupsd.status.txt \ >>> -v \ >>> /tmp/statmail.txt >>> >>> # rm /tmp/statmail.txt >> >> >> Když spustím rucne /util/mymail, tak se provede spravne. >> >> To mi nekdo reknete, proc cron na to kasle.. 8-( >> >> >> >> >> >> >> -- >> FreeBSD mailing list (users-l@freebsd.cz) >> http://www.freebsd.cz/listserv/listinfo/users-l >> -- Juraj Lutter | /\ ASCII Ribbon Campaign otis (at) wilbury (dot) sk | \/ - NO HTML/RTF in e-mail http://www.wilbury.sk/ | /\ - NO Word docs in e-mail JID: otis (at) jabber (dot) vx (dot) sk !07/11 PDP a ni deppart m'I !pleH -- FreeBSD mailing list (users-l@freebsd.cz) http://www.freebsd.cz/listserv/listinfo/users-l