Python Forum
crontab on RHEL7 not calling python script wrapped in shell script - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: crontab on RHEL7 not calling python script wrapped in shell script (/thread-26793.html)



crontab on RHEL7 not calling python script wrapped in shell script - benthomson - May-13-2020

Hi I have a Python3 script wrapped in a shell script (needs to be for the moment) which executes fine when running from command line, but doesn't execute from crontab.

I have tested touching a file within the wrapper and it is created, so the script is running, but the python call does nothing.

Shell script contains as follows, very basic:

python dvdsrefresh.py ${1}

No errors, no output.

"which python" resolves to: /opt/rh/rh-python36/root/bin/python


RE: crontab on RHEL7 not calling python script wrapped in shell script - micseydel - May-28-2020

You need to provide more details. When you say "wrapped in a shell" I expected the Python code to be embedded in a shell script, but you show a .py file. Please give enough detail to reproduce.