Re: Nejde úloha z CRONu
Marek Slebodnik
mslebodnik at gmail.com
Fri Mar 30 10:14:06 CEST 2012
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 <roman na 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.adresaa na xxxx.cz \
> > -H 192.168.1.1 \
> > -f yyyyyy na 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 na freebsd.cz)
> http://www.freebsd.cz/listserv/listinfo/users-l
>
More information about the Users-l
mailing list