Python Forum
crontab on RHEL7 not calling python script wrapped in shell script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
crontab on RHEL7 not calling python script wrapped in shell script
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 ${1}

No errors, no output.

"which python" resolves to: /opt/rh/rh-python36/root/bin/python
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.
Feel like you're not getting the answers you want? Checkout the help/rules for things like what to include/not include in a post, how to use code tags, how to ask smart questions, and more.

Pro-tip - there's an inverse correlation between the number of lines of code posted and my enthusiasm for helping with a question :)

Possibly Related Threads…
Thread Author Replies Views Last Post
  python keeps opening script directory Tyrel 2 160 Jul-27-2021, 08:37 PM
Last Post: Tyrel
  Using import in python script offline - HELP!! blackhatter1001001 1 184 Jul-25-2021, 05:57 AM
Last Post: ndc85430
  how to loop a script? ZYSIA 1 236 Jul-22-2021, 06:46 AM
Last Post: Gribouillis
  string function doesn't work in script ClockPillow 3 305 Jul-13-2021, 02:47 PM
Last Post: deanhystad
  Encountering `importlib_metadata.PackageNotFoundError` trying to run console script gretchenfrage 0 135 Jul-08-2021, 09:26 PM
Last Post: gretchenfrage
  [split] Help- converting file with pyton script eltomassito 6 447 Jul-02-2021, 05:29 PM
Last Post: snippsat
  Py script that triggers ever 3 hours, but only between 9:15 am to 3:30 pm, Mon to Fri Pymod 2 241 Jun-30-2021, 05:14 PM
Last Post: Larz60+
  script with imports works but pytest gives "ModuleNotFoundError"? Hpao 0 220 Jun-27-2021, 08:30 PM
Last Post: Hpao
  How can I get Python Bulk Email Verification Script With API? zainalee 1 350 Jun-06-2021, 09:19 AM
Last Post: snippsat
  Python script for excel sheet Nabil 5 483 Jun-01-2021, 02:29 PM
Last Post: anuradha

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020