为了账号安全,请及时绑定邮箱和手机立即绑定

crontab定时任务不执行

crontab定时任务不执行

守着星空守着你 2019-04-08 11:18:12
系统是centos,发现crontab定时任务不执行登录系统用手工执行脚本就可以其它如crontab配置文件没有对用户做限制,脚本权限也赋予执行,用root账户执行,但是最后还是不行,请各位大神指点一下,下面是Log和脚本内容Feb714:10:011280859075761a8Zcrond[12517]:(root)CMD(/usr/lib/sa/sa111)Feb714:20:011280859075761a8Zcrond[12813]:(root)CMD(/usr/lib/sa/sa111)Feb714:30:011280859075761a8Zcrond[13115]:(root)CMD(/usr/lib/sa/sa111)Feb714:40:011280859075761a8Zcrond[13471]:(root)CMD(/usr/lib/sa/sa111)Feb714:41:021280859075761a8Zcrontab[13510]:(root)BEGINEDIT(root)Feb714:41:471280859075761a8Zcrontab[13510]:(root)ENDEDIT(root)Feb714:41:511280859075761a8Zcrontab[13534]:(root)BEGINEDIT(root)Feb714:42:241280859075761a8Zcrontab[13534]:(root)REPLACE(root)Feb714:42:241280859075761a8Zcrontab[13534]:(root)ENDEDIT(root)Feb714:42:401280859075761a8Zcrontab[13564]:(root)LIST(root)Feb714:43:011280859075761a8Zcrond[18021]:(root)RELOAD(cron/root)Feb714:45:011280859075761a8Zcrond[13638]:(root)CMD(/backuptoqiniu/backuptoqiniu.sh)Feb714:50:01AY1311280859075761a8Zcrond[13791]:(root)CMD(/usr/lib/sa/sa111)Feb715:00:01AY1311280859075761a8Zcrond[14091]:(root)CMD(/usr/lib/sa/sa111)Feb715:01:01AY1311280859075761a8Zcrond[14120]:(root)CMD(run-parts/etc/cron.hourly)shellcode#!/bin/bashBACKUP_SRC="/home/wwwroot/tes"MYSQL_SERVER="127.0.0.1"MYSQL_USER="test"MYSQL_PASS="tset"DATEBASE="tee"HOST="544"NOW=$(date+"%Y-%m-%d-%H")echo"startdumpmysql"ases.sql"-u$MYSQL_USER-h$MYSQL_SERVER-p$MYSQL_PASS$DATEBASE>"$NOW-Databecho"dumpok"echo"starttar"tar-cPzf$HOST-$NOW-backup.tar.gz$NOW-Databases.sql"$BACKUP_SRC"echo"tarok"python/root/backuptoqiniu/upload.pyrm-f$NOW-Databases.sql$HOST-$NOW-backup.tar.gzecho"ALLok"crontabcommand4514***/backuptoqiniu/backuptoqiniu.sh
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 243 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信