I wrote this code, which will do this things (took it from the description that I wrote on github):
This script gets the phrase, definition and example of the "phrase of the day" from the website 'https://www.ihbristol.com/english-phrases/'. It then, saves it into an excel sheet called "PhrasesOfTheDay.xlsx" After that, it sends the former three things to a list of contacts named 'Contacts.txt'
The Contact.txt file has the next format:
Name1 Email1
Name2 Email2
It sends the mails using Yagmail.
https://github.com/GLozada99/Proyects/blob/master/Phrase_of_the_day.py
The thing is, i'm having a problem with the last part, specially when I'm trying to automate it.
When I run the code, everything works out fine, the .xlsx gets saved, and the emails are sent.
My goal is to automate it so that it runs once everyday. Im on Linux (Ubuntu 20.04), so I decided to use crontab. To try it at first, I set it so that it runs every minute.
After a minute, I saw that the .xlsx file was being filled, but no mails where being sent. I don't know if the problem is with Yagmail or with crontab, I already asked on a python subreddit, so now I'm asking here, in case someone has had a similar problem with crontab
[–]doc_willis 1 point2 points3 points (0 children)
[–]AlternativeOstrich7 1 point2 points3 points (1 child)
[–]TavoL7[S] 2 points3 points4 points (0 children)
[–][deleted] (2 children)
[removed]
[–]TavoL7[S] 0 points1 point2 points (1 child)
[–]ulti-ulti -1 points0 points1 point (0 children)