2

I created a Python script with pynput which I want to run with a crontab. The script needs access to input monitoring.

In "Security & Privacy" I added the Python version which I use in my crontab. I copied the path from my crontab into the Finder Go to Folder function Finder > Go > Go to Folder... > /usr/local/bin/python3.10 and drag and dropped the Python version in the input monitoring field. In my backup.log file from cron I still can see the error message This process is not trusted! Input event monitoring will not be possible until it is added to accessibility clients. and the script is not working.

Input Monitoring

enter image description here

Crontab

* * * * * /usr/local/bin/python3.10 /Users/username/Projects2022/ShortcutManager/shortcuts.py > /Users/username/backup.log 2>&1

Error von backup.log

enter image description here

What is wrong?

teres
  • 53
  • 6

1 Answers1

1

Solution

The error message This process is not trusted! Input event monitoring will not be possible until it is added to accessibility clients. was not the reason why my script didn't worked. The problem was that I didn't checked cron in the Accessibility section.

Cron needs to to be checked

enter image description here

teres
  • 53
  • 6