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
#1
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
Reply
#2
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 :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Call a bash script from within a Python programme Pedroski55 6 200 Yesterday, 01:53 PM
Last Post: DeaD_EyE
  No module named '_cffi_backend' error with executable not with python script stephanh 2 228 Nov-25-2021, 06:52 AM
Last Post: stephanh
  Simple Python script, path not defined dubinaone 3 318 Nov-06-2021, 07:36 PM
Last Post: snippsat
  execute python script guy7200 1 279 Oct-25-2021, 09:55 PM
Last Post: Axel_Erfurt
  Real-Time output of server script on a client script. throwaway34 2 402 Oct-03-2021, 09:37 AM
Last Post: ibreeden
  Script stop work after 3 actioins - PLEASE WHERE IS THE PROBLEM? rondon442 0 319 Sep-27-2021, 05:40 PM
Last Post: rondon442
  Problem executing a script on a remote host tester_V 3 419 Sep-26-2021, 04:25 AM
Last Post: tester_V
  Architecture question for website with python crontab script rockie12us 1 466 Aug-09-2021, 10:07 AM
Last Post: Larz60+
  python keeps opening script directory Tyrel 5 871 Aug-06-2021, 10:43 PM
Last Post: snippsat
  Using import in python script offline - HELP!! blackhatter1001001 1 685 Jul-25-2021, 05:57 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

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