I'm setting up a launchctl server to run a python file regularly. So I write a.plist file , auto.sh file and it works well. However, after I installed Macos Catalina, it failed. I write "ls -l" in auto.sh to check file permission, log shows that:
ls: .: Operation not permitted
python3: can't open file 'auto.py': [Errno 1] Operation not permitted
How can I do to fix it? Thank you so much.
here is my code:
auto.sh:
#!/bin/bash
. ~/.bash_profile
conda activate base
cd /Users/gassy/Documents/
ls -l
python3 auto.py
I put such .plist file in /Users/gassy/Library/LaunchAgents/com.gassy.fangzhou.plist
...
<key>Program</key>
<string>/Users/gassy/auto/launch.sh</string>
...
所有评论(0)