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
  Launch Python IDLE Shell from terminal Pavel_47 5 1,262 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Creating csv files from Excel file azizrasul 40 5,718 Nov-03-2022, 08:33 PM
Last Post: azizrasul
  batch file for running python scipt in Windows shell MaartenRo 2 1,906 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Creating file with images BobSmoss 1 1,397 Jan-08-2022, 08:46 PM
Last Post: snippsat
  Creating csv file from another file pisike 0 1,611 Nov-24-2020, 02:02 PM
Last Post: pisike
  How to make a Python program run in a dos shell (cmd) Pedroski55 2 2,334 Nov-09-2020, 10:17 AM
Last Post: DeaD_EyE
Bug Python Shell 3.9.0 - Issue with indentation Earis 17 6,663 Oct-31-2020, 07:00 AM
Last Post: Earis
  Creating Conda env from requirments.txt file ErnestTBass 7 15,758 Apr-23-2020, 06:57 PM
Last Post: snippsat
  Python "Terminal" vs "Shell" SectionProperties 2 2,677 Apr-10-2020, 08:36 AM
Last Post: SectionProperties
  Creating a pdf from file DT2000 4 2,340 Apr-03-2020, 07:16 PM
Last Post: DT2000

Forum Jump:

User Panel Messages

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