【发布时间】:2021-06-06 15:14:04
【问题描述】:
所以我有以下 cronjob 并且我不断收到此错误
bash: ./bash.sh: Operation not permitted.
这是我的计划
*/5 * * * * cd /Users/user/Desktop/Code/repo/__tests__/desktopTests && ./bash.sh > /tmp/stdout.log 2> /tmp/stderr.log
我做错了什么?
基本上在 bash 脚本中,我要做的就是运行这两个脚本
npm run test testing.js && node db.js
【问题讨论】:
-
更改权限,
sudo chmod a+x bash.sh -
是 cron 特有的问题吗?
-
@thatotherguy 是的
-
见cross-site duplicate。 tl;dr:MacOS 具有非传统的 ~/桌面保护
标签: javascript bash macos cron