2
我运行下面的cron作业:奇怪的cron行为......神秘的 “应用程序” 找不到
#!/bin/bash
touch test.file
cp test.file test.test
用下面的cron:
33 17 * * * * ~/Utils/test.sh
而且我得到以下错误:
/bin/sh: Applications: command not found
任何帮助?
在OS X/MacOS的,的cron一直赞成的launchd的弃用。我建议改为使用它,这是记录[这里](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html#//apple_ref/doc/uid/10000172i-SW7-SW7)。另外,您应该指定脚本的完整路径,而不是使用'〜'作为主目录。 – TheDarkKnight
我没有意识到这一点。让我至少更新到一个完整的路径......不知道我是否打算使用launchd。也许,嘿。 –