【发布时间】:2022-10-25 22:50:18
【问题描述】:
34 7 * * * test_cron > /tmp/stdout.log 2> /tmp/stderr.log
我的可执行文件“test_cron”包含:
echo "Test cron job ..."
now=$(date)
echo "Cron job update completed at $now"
但是当它执行时,标准错误如下:
tmp % tail /tmp/std*
==> /tmp/stderr.log <==
/bin/sh: test_cron: command not found
==> /tmp/stdout.log <==
这是否意味着它找不到/bin/sh?如何解决?
【问题讨论】:
-
不,恰恰相反。 sh 找不到您的脚本。
标签: cron