Sample Header Ad - 728x90

Python script unable to access external drive under cron

0 votes
0 answers
131 views
My desired cron job consists of a bash script that does the following: * Create a new Python environment (with a new python executable) * Use that Python executable to run a Python script, which accesses an external hard drive How do I create a job like this on macOS? My issue is that cron and executables under cron do not have access to external drives by default. I typically work around this by manually allowing "Full Disk Access". For example, I have given my cron and rsync executables full disk access already, which solved their respective issues with disk access. However, I am unable to give the python executable full disk access manually since I am creating a new python executable for each job that runs. It would be great if I could programmatically give my new python executable access to the external drive, or just disable the need for "Full Disk Access" entirely, but I haven't found a way to accomplish either of those.
Asked by Michael Jan (1 rep)
Jul 24, 2023, 07:11 PM
Last activity: Jul 24, 2023, 09:29 PM