Python Forum
subprocess Popen not working via crontab
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
subprocess Popen not working via crontab
#2
I assume things in crontab are executed with a very specific user and environment, and the PATH can be different from what you have in a plain user session. So for a start I would give the full path to the executable, but this could not be sufficient.

As an experiment, write a Python script that reports the executing user id, the working directory and dumps the environment variables and have it execute from crontab.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
RE: subprocess Popen not working via crontab - by Ofnuts - Mar-15-2017, 09:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Understanding subprocess.Popen Pedroski55 6 547 May-12-2024, 10:46 AM
Last Post: Pedroski55
Information subprocess.Popen() suddenly giving me grief? davecotter 3 826 Dec-13-2023, 10:49 PM
Last Post: davecotter
  Use subprocess.Popen and time.sleep chucky831 2 2,071 Aug-11-2022, 07:53 PM
Last Post: carecavoador
  Architecture question for website with python crontab script rockie12us 1 1,832 Aug-09-2021, 10:07 AM
Last Post: Larz60+
  Subprocess.Popen() not working when reading file path from csv file herwin 13 16,205 May-07-2021, 03:26 PM
Last Post: herwin
  Did subprocess.Popen() causes main routine to pause stdout? liudr 4 3,836 May-04-2021, 08:58 PM
Last Post: liudr
  disable subprocess.popen prompt echo paul18fr 1 2,153 Feb-04-2021, 02:50 AM
Last Post: Larz60+
  how to pass the interactive string to Popen subprocess maiya 1 2,008 Sep-18-2020, 09:36 PM
Last Post: Larz60+
  How to get program output from subprocess.Popen? glestwid 1 2,483 Aug-19-2020, 05:44 AM
Last Post: buran
  python os.popen is not working for wait method elenaflorence87 0 2,089 Jul-22-2020, 12:56 PM
Last Post: elenaflorence87

Forum Jump:

User Panel Messages

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