Trying to run a python script from ubuntu crontab

前端 未结 3 724
暖寄归人
暖寄归人 2021-01-07 05:44

Hey I am running into an issue when trying to run a cron job with a python script from ubuntu. This is what I have done:

1.) Wrote a simple tkinter app: source for

3条回答
  •  时光说笑
    2021-01-07 06:13

    I use crontab to run a bash file

    30 12 * * 1,2,3,4,5 /home/edward/SSF/SW/EODWD.sh

    in termanal -- use crontab -e

    the bash file executes as many other programs as you wish

    /home/edward/SSF/SW/EODWD.py >> /home/edward/Desktop/eodmail.log wait

    this example also sends all print statements in EODWD.py to a log file automatically

    the wait statement forces competion before taking the next command

    this works ONLY IF both files ( *.py & *.sh ) are made executable

提交回复
热议问题