Monday, August 14, 2023
HomeApplesafety - Python script unable to entry exterior drive beneath cron

safety – Python script unable to entry exterior drive beneath cron


My desired cron job consists of a bash script that does the next:

  • Create a brand new Python setting (with a brand new python executable)
  • Use that Python executable to run a Python script, which accesses an exterior onerous drive

How do I create a job like this on macOS?

My concern is that cron and executables beneath cron would not have entry to exterior drives by default. I sometimes work round this by manually permitting “Full Disk Entry”. For instance, I’ve given my cron and rsync executables full disk entry already, which solved their respective points with disk entry.

Nevertheless, I’m unable to provide the python executable full disk entry manually since I’m creating a brand new python executable for every job that runs.

It might be nice if I may programmatically give my new python executable entry to the exterior drive, or simply disable the necessity for “Full Disk Entry” totally, however I have not discovered a option to accomplish both of these.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments