为什么我的cron工作会得到意外的EOF? [英] Why I'm getting unexpected EOF for my cron job?
本文介绍了为什么我的cron工作会得到意外的EOF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的Cron工作收到错误。我一直得到的错误是:
I am receiving an error with my Cron job. The error I keep getting is:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
这是我的代码:
mysqldump -u database_user -p']T%zw51' database > /home/site/public_html/Secure/Cron/Database_Backup/database_backup.sql
推荐答案
您可能需要使用 \
转义%
。
%
是crontab的一个特殊字符,它被转换为换行符,因此您的代码可能变成了
You may need to escape the %
with a \
.
%
is a special character to the crontab, which gets translated to a newline, so your code was probably becoming
-p']T
zw51'
尝试:
-p']T\%zw51'
这篇关于为什么我的cron工作会得到意外的EOF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文