Python Forum
Help creating shell scrip for python file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help creating shell scrip for python file
#11
Also the shell script is just a redirection that is not needed,can call the python file directly in crontab.
If you have files in mkzero folder i would do it like this,first cd in then give command.
Make first executable chmod a+x envirophat2.py
*/2 * * * * cd /home/mkzero/shenviro && python3 envirophat2.py >> envirolog.csv 2>&1
Depend on system setup(i do not need this) to give absolute path to python3 /usr/bin/python3 .
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  set -x shell equivalent of python, possible/available? ggpf900 1 413 Jan-25-2025, 08:01 PM
Last Post: Gribouillis
  Launch Python IDLE Shell from terminal Pavel_47 5 2,537 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Creating csv files from Excel file azizrasul 40 11,834 Nov-03-2022, 08:33 PM
Last Post: azizrasul
  batch file for running python scipt in Windows shell MaartenRo 2 2,937 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Creating file with images BobSmoss 1 1,988 Jan-08-2022, 08:46 PM
Last Post: snippsat
  Creating csv file from another file pisike 0 2,015 Nov-24-2020, 02:02 PM
Last Post: pisike
  How to make a Python program run in a dos shell (cmd) Pedroski55 2 3,187 Nov-09-2020, 10:17 AM
Last Post: DeaD_EyE
Bug Python Shell 3.9.0 - Issue with indentation Earis 17 10,249 Oct-31-2020, 07:00 AM
Last Post: Earis
  Creating Conda env from requirments.txt file ErnestTBass 7 36,149 Apr-23-2020, 06:57 PM
Last Post: snippsat
  Python "Terminal" vs "Shell" SectionProperties 2 3,398 Apr-10-2020, 08:36 AM
Last Post: SectionProperties

Forum Jump:

User Panel Messages

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