Hi All,
We are running a script to send an email and it was successful when it was run manually but via crontab it won't work. It throws an error below. We use path of python3.11 for both. Weird thing is its working using python 3.6 in crontab but what we need is to work with 3.11.
smtplib.py", line 776, in starttls
raise RuntimeError("No SSL support included in this Python")
RuntimeError: No SSL support included in this Python
Crontab not working for python3.11 script
Re: Crontab not working for python3.11 script
cron uses a limited set of environment variables, much more limited than the environment for an ordinary user.
When something runs from the command line but not from cron, it is most of the times a missing environment variable, or an environment variable with a different value. For example, PATH may contain far less directories.
When something runs from the command line but not from cron, it is most of the times a missing environment variable, or an environment variable with a different value. For example, PATH may contain far less directories.
Re: Crontab not working for python3.11 script
Hey pjsr2,
Thanks for your reply. I just declare the bash parameter on crontab and it works.
Thanks for your reply. I just declare the bash parameter on crontab and it works.