On MacOS: Is there a way to let Python Create Cron Tasks without Security Prompt?

21 Views Asked by At

I have a Python script which, amongst other things, creates a bunch of cron tasks. When I run the script and it comes to creating the cron tasks, not surprisingly,I get the Mac security prompt asking me whether to allow this action or not.

As this script will run daily, is there a way where I can set the permissions once, manually or otherwise, and then all subsequent runs will not require a human intervention to allow the creation of cron tasks?

FYI - I am using python-crontab package

I gave Terminal Full Disk Access via security and privacy menu in settings and that seemed to work, but security wise, I wasn't comfortable with that, so I revoked access. Also as I read, from time to time you may see the security prompt. I am pretty certain the answer is in setting the right permissions for the python script, but my grasp of permissions is bare at best.

0

There are 0 best solutions below