我正在尝试使用 cron 运行 shell 脚本文件,但出现权限被拒绝错误。
这是我的 cron 文件。
53 14 30 10 * $HOME/Documents/Python/shellScript.sh
Run Code Online (Sandbox Code Playgroud)
我想在今天的特定时间运行 shellScript 文件。
这是我的 shellScript.sh 文件。
osascript<<EOF
tell application "System Events"
tell process "Terminal" to keystroke "t" using command down
end
tell application "Terminal"
activate
do script with command "python file1.py" in window 1
end tell
EOF
osascript<<EOF
tell application "System Events"
tell process "Terminal" to keystroke "t" using command down
end
tell application "Terminal"
activate
do script with command "./ngrok 5000" in window 1
end tell
EOF
python file2.py
Run Code Online (Sandbox Code Playgroud)
我在邮件中收到了这个。/bin/sh: /Users/XXX/Documents/Python/shellScript.sh: 权限被拒绝
如果有人能帮我解决这个问题,那就太好了。谢谢
| 归档时间: |
|
| 查看次数: |
8102 次 |
| 最近记录: |