/etc/crontab not work on root

Day Sirs!

Please help me with crontab on my FreeBSD 11 system,

I login with root and needs to make this crontab job:

Code:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD$
# 1
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin 2
#
#minute    hour    mday    month    wday    who    command 3
#
*/11    *    *    *    *    operator /usr/libexec/save-entropy
*/5    *    *    *    *    root    /usr/libexec/atrun
1    3    *    *    *    root    periodic daily
15    4    *    *    6    root    periodic weekly
30    5    1    *    *    root    periodic monthly
1,31    0-5    *    *    *    root    adjkerntz -a
*       *       */1     *       *       root    mysqldump -u root -pmasterMYSQL CBM | gzip> /usr/local/www/CBM_`date +%m-%d-%Y`.sql.gz
*       *       *       */1     *       root    rm /usr/local/www/*.*

Shield not work please help.

Kind regards,
from Russland
 
Last edited by a moderator:
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin 2
..
* * */1 * * root mysqldump -u root -pmasterMYSQL CBM | gzip> /usr/local/www/CBM_`date +%m-%d-%Y`.sql.gz
..

Is it a typo or do you really have the ' 2' in PATH string ? Please delete this number.
Also, mysqldump not in PATH here. Try to expand the PATH variable to:

Code:
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
 
Apart from the above messages also always check your (local) e-mail. The output of the system cronjobs is send by e-mail to root, so I'm fairly certain that you'll find the exact problem mentioned in there as well. Maybe time to check /var/mail before your file system starts filling up?
 
Back
Top