老鸟救命啊,郁闷中。。。。。crontab的问题(顶起,还没解决)

老鸟救命啊,郁闷中。。。。。crontab的问题(顶起,还没解决)

复制内容到剪贴板
代码:
01 5 * * *  root /home/mysqlbackup/backup.sh
31 5 * * *  root /home/mysqlbackup/back.sh
01 8 * * *  root /home/mysqlbackup/backup.sh
40 9 * * *  root /home/mysqlbackup/back.sh
41 9 * * *  root /home/mysqlbackup/backup.sh
31 12 * * * root  /home/mysqlbackup/back.sh
01 15 * * * root  /home/mysqlbackup/backup.sh
31 15 * * *  root /home/mysqlbackup/back.sh
01 18 * * *  root /home/mysqlbackup/backup.sh
31 18 * * *  root /home/mysqlbackup/back.sh
01 21 * * *  root /home/mysqlbackup/backup.sh
31 21 * * *  root /home/mysqlbackup/back.sh
01 23 * * * mysql /home/mysqlbackup/backup.sh
31 23 * * * mysql /home/mysqlbackup/back.sh
检查脚本中shell设置是否正确。
或将脚本贴出来瞧瞧。
出现什么样的错误,当时的有什么提示,还有日志。这些你都要提供啊。
不知道日志在什么地方。
脚本我觉得没什么错,因为,我SH运行都可以的啊
脚本一
复制内容到剪贴板
代码:
#!/bin/sh
# File: /home/mysql/backup.sh
# Database info
DB_NAME="znzjw"
DB_USER="znzjw"
DB_PASS="znzjw123456"

# Others vars
BIN_DIR="/usr/bin"
BCK_DIR="/home/mysqlbackup/backupfiles"
DATE=`date +%F%T`

# TODO
$BIN_DIR/mysqldump --opt -u$DB_USER -p$DB_PASS $DB_NAME | gzip > $BCK_DIR/db_$DATE.gz
~
复制内容到剪贴板
代码:
Aug 14 00:01:01 localhost crond[14837]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 01:01:01 localhost crond[14989]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 02:01:01 localhost crond[15150]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 03:01:01 localhost crond[15270]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 04:01:01 localhost crond[15441]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 04:02:01 localhost crond[15457]: (root) CMD (run-parts /etc/cron.daily)
Aug 14 04:02:02 localhost anacron[15472]: Updated timestamp for job `cron.daily' to 2008-08-14
Aug 14 05:01:01 localhost crond[15905]: (mysql) CMD (/home/mysqlbackup/backup.sh)
Aug 14 05:01:01 localhost crond[15907]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 05:31:01 localhost crond[15970]: (mysql) CMD (/home/mysqlbackup/back.sh)
Aug 14 06:01:01 localhost crond[16024]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 07:01:01 localhost crond[16132]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 08:01:01 localhost crond[16241]: (mysql) CMD (/home/mysqlbackup/backup.sh)
Aug 14 08:01:01 localhost crond[16243]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 08:31:01 localhost crond[16306]: (mysql) CMD (/home/mysqlbackup/back.sh)
Aug 14 09:01:01 localhost crond[16360]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 10:01:01 localhost crond[16468]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 11:01:01 localhost crond[16576]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 12:01:01 localhost crond[16685]: (mysql) CMD (/home/mysqlbackup/backup.sh)
Aug 14 12:01:01 localhost crond[16687]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 12:31:01 localhost crond[16750]: (mysql) CMD (/home/mysqlbackup/back.sh)
Aug 14 13:01:01 localhost crond[16804]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 14:01:01 localhost crond[16912]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 15:01:01 localhost crond[17021]: (mysql) CMD (/home/mysqlbackup/backup.sh)
Aug 14 15:01:01 localhost crond[17022]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 15:31:01 localhost crond[17086]: (mysql) CMD (/home/mysqlbackup/back.sh)
Aug 14 16:01:01 localhost crond[17140]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 17:01:02 localhost crond[17294]: (root) CMD (run-parts /etc/cron.hourly)
Aug 14 17:04:23 localhost crond[17329]: (CRON) STARTUP (V5.0)
Aug 14 17:04:33 localhost crond[17348]: (CRON) STARTUP (V5.0)
Aug 14 17:05:14 localhost crond[17370]: (CRON) STARTUP (V5.0)
Aug 14 09:28:01 localhost crond[17370]: (*system*) RELOAD (/etc/crontab)
Aug 14 09:28:07 localhost crond[17988]: (CRON) STARTUP (V5.0)
Aug 14 09:30:01 localhost crond[17993]: (root) CMD (/home/mysqlbackup/back.sh)
Aug 14 09:31:01 localhost crond[18000]: (root) CMD (/home/mysqlbackup/backup.sh)