【发布时间】:2020-06-14 01:06:27
【问题描述】:
Cron 无法运行作业并向我发送此电子邮件:
标题:
cd /var/www/www-root/data/www/mysite.com/laravel/ && find ./ -mtime -1 -type f -printf "
正文:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
我正在使用 ISPmanager,这是 cron 工作:
cd /var/www/www-root/data/www/mysite.com/nuxt/ && find ./ -mtime -1 -type f -printf "%p\n" | while read name ; do zip /var/www/www-root/data/www/mysite.com/laravel/storage/app/backup/nuxt_files.zip $name; done
该代码在 ssh bash 中运行完美,即使我通过按 ISPmanager 中的“运行”按钮来运行该 cron 作业。我不知道 cron 出了什么问题。
【问题讨论】: