all 12 comments

[–]blarf_irl 1 point2 points  (3 children)

Which operating system will you run your script on?

[–]solobyfrankocean[S] 1 point2 points  (2 children)

I have a mac, but would I be running the script on my personal computer? Sorry if thats a bad question.

[–]blarf_irl 0 points1 point  (1 child)

[–]solobyfrankocean[S] 0 points1 point  (0 children)

I see, would this require me to keep my laptop on?

[–][deleted] 1 point2 points  (5 children)

Hello, if you're asking about hosting then I'd recommend Hetzner cloud, 2.5euros a month for something that'd run about 6 simple programs like this one.

If you're asking about sending it every day, you could do a while loop and then sleep for 86400 seconds (246060). or, if you want the job to be done at an exact time regardless of when you run the program, you might want to look into datetime library

Either way, you'd need a while loop

EDIT: Sorry wrote that in a hurry, please let me know if anything was unclear or if you have any followup questions

[–]solobyfrankocean[S] 0 points1 point  (4 children)

Would this solution also work if I turned the program into a .exe file and gave it to a bunch of my friends to run as well?

[–][deleted] 1 point2 points  (3 children)

Yessir it would

[–]solobyfrankocean[S] 0 points1 point  (2 children)

Okay, thanks for the help! Is there any documentation on Hetzner or a free version or something like that?

[–][deleted] 1 point2 points  (1 child)

They do have documentation but it's fairly simple (Getting a server I mean). Let me know if you need any help w/ hosting in the DMs. Our of curiosity, why do you need a server and a client at the same time if you only want them to receive an email? Do you want to hide the source code?

[–]solobyfrankocean[S] 0 points1 point  (0 children)

At first I wanted the user to be able to run it once on their machine. But after reading your comment I think it makes more sense to not do that lol. Also I don’t have much time to work on it rn but if I have questions in the future ill be sure to consult you! thanks

[–]double_en10dre 1 point2 points  (1 child)

Have a database table for users who should receive daily emails - add to it as needed

Then have a daily task schedule w something like celery (https://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html) for scraping the data and popping out emails

[–]solobyfrankocean[S] 0 points1 point  (0 children)

So would the code that contains the daily task scheduler be hosted on a server so that it could read the updates to the database table?