bash - crontab failed with exit status 12 -


from syslog

may  8 01:00:01 mvtspro-main /usr/sbin/cron[22645]: (root) cmd (/usr/local/ky4k0b/cdrs_backup_daily.sh) may  8 01:00:01 mvtspro-main /usr/sbin/cron[22638]: (cron) error (grandchild #22645 failed exit status 12) 

from /etc/crontab

mvtspro-main:/cdrs/backup# cat /etc/crontab shell=/bin/sh path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  # m h dom mon dow user  command 17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # 25 6    * * *   root    ntpdate pool.ntp.org 0 1 * * *       root    /usr/local/ky4k0b/cdrs_backup_daily.sh 0 2 1 * *       root    /usr/local/ky4k0b/cdrs_backup_monthly.sh 0 3 1 * *       root    /usr/local/lib/mvtspro/backupdb.php 

my script

mvtspro-main:/cdrs/backup# cat /usr/local/ky4k0b/cdrs_backup_daily.sh #!/bin/sh mask=`date --date="yesterday" +%y%m%d\*` arch_name=`date --date="yesterday" +%y%m%d` find /cdrs -type f -name "$mask"|zip -m /cdrs/backup/$arch_name.zip -@ 

where did make mistake? thanks! ps: if run script manually works fine.

i remember having same problem cron. in case excessive output tar not getting directed anywhere block script after buffer ran full. redirecting output of called script /dev/null worked me (or maybe setting mailto="").


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -