I have the following crontab:
00 18 * * * /Users/username/Desktop/RUN.command > /Users/username/Desktop/cron.log 2>&1
Within the command file is:
#!/bin/bash
wd=$(dirname $(realpath ${BASH_SOURCE[0]}))
logdir=/datastore_updater/cronlogs
logdate=/$(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 deactivate
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 cron.log
/bin/bash: /Users/username/Desktop/RUN.command: Operation not permitted
Why is operation not permitted event though the permissions for RUN.command
is set to +x
?