I have the following crontab on my mac OS Catalina 10.15.1 :
00* 18* * * * /Users/username/Desktop/RUNcronjob.commandsh > /Users/username/Desktop/croncronjob.log 2>&1
Within the command file is:
#!/bin/bash
wd=$(dirname $(realpathtouch ${BASH_SOURCE[0]}))
logdir=/datastore_updater/cronlogs
logdate=tmp/$(date '+%Y-%m-%d')
logfile=$wd$logdir$logdate.log
cd $wd
eval "$(conda shell.bash hook)"
conda deactivate
conda activate invest_scripts
python -m datastore_updater > $logfile 2>&1
conda deactivatefoo
where datastore_updater
is a python package and invest_scripts
is a conda environment. However when 6pm passed, I was left with the following line inside croncronjob.log
/bin/bash: /Users/username/Desktop/RUNcronjob.commandsh: Operation not permitted
Why is operation not permitted event though the permissions for RUNcronjob.commandsh
is set to +x
?