Reputation: 13
i just started working with python and with some scripts to automate some tasks. I manage to create a web scraper using selenium that notifies me daily with the latest news via a mail . Now the script works great if i run it manually , but my question is : How can i make the script to run automatically every day , and what option would you recomand . I know that you can use TaskScheduler and program it , but i was wondering if you know any options to run it directly in the cloud ? Also , i found some tutorials where they say to wrap all the code in an infinite loop and add a timer , and once you run the script it will stay active as a background process, I just started working with scripts and automation , so i would really like to know your opinion on the best way to run the script automatically . Thanks a lot
Upvotes: 1
Views: 1202
Reputation: 524
If you schedule in your computer, i think it may not be proper solution. It's better to deploy it on any cloud platforms & schedule at any particular time.
I personally suggest Heroku
, I'm using it for running multiple scripts for free. You can use scheduler addon
for scheduling scripts to run at particular time as well. Please refer to heroku
documentation & get started! Note: The script may run more time than you expected, please refer here to fix this.
Upvotes: 0
Reputation: 14
Im not sure if that is what you are looking for, but (if you are on windows) you could attach your program to your autostart. Probably your Startup Folder: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
Upvotes: 0