When I am trying to execute python on crontab ,I jut run a dummy program and I found the following information
JavaScript
x
root@beaglebone:/tmp# cat env.output
HOME=/root
LOGNAME=root
PATH=/usr/bin:/bin
LANG=en_US.UTF-8
SHELL=/bin/sh
PWD=/root
I have given my crontab like this
JavaScript
SHELL=/bin/sh
PATH=/usr/bin:/bin
24 20 09 11 * python3 /bin/remote_iomodified.py
What will be the path for my corntab
Advertisement
Answer
Always use absolute paths when adding cronjobs:
JavaScript
24 20 09 11 * /usr/bin/python3 /bin/remote_iomodified.py