"sh: sysctl Command not Found" for Mac OS X running cron

I have a python script, script.pyand I use cron to run this script periodically. The script works as expected, but after completing the cron job, I get the following error in / var / mail / [myusername]:

sh: sysctl Command Not Found

The following cron job:

0 14  * * * PATH=$PATH:/usr/sbin PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ /usr/bin/python2.7 ~/.../script.py

I was told to include PATH and PYTHONPATH in the task (as before, python did not recognize several modules that I imported and installed), so at the moment I'm not sure what the problem may be

+4
source share
1 answer

Mac sysctl /sbin/ /usr/sbin/. /sbin PATH

+3

Source: https://habr.com/ru/post/1669998/


All Articles