Python Script Not Working Via Cron?

后端 未结 1 1650
死守一世寂寞
死守一世寂寞 2021-01-23 05:05

I have a python script that runs another python script. that \'other script\' (script being run) takes ~ 45[min] to complete.

When the \'execution\' script is run from U

1条回答
  •  别那么骄傲
    2021-01-23 05:56

    There are usually a few common misunderstandings made when trying to run things from cron.

    • There is no session. If you have code that needs a session you have to do additional setup.
    • The PATH and other environment variables are almost always different between your user session and the cron execution environment.

    When cron fails it will by default attempt to send mail. You can look in your local mail box or queue (if your mta is down) for errors.

    0 讨论(0)
提交回复
热议问题