Skip to content Skip to sidebar Skip to footer

Python Script Not Working Via Cron?

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 Ubuntu's shell,

Solution 1:

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.

Post a Comment for "Python Script Not Working Via Cron?"