[英]How can I run my python program continuously
So, I've written a python program that collects data from an api every minute, stores the data in a csv file and then email it every 24 hours using the smtp library. So, I've written a python program that collects data from an api every minute, stores the data in a csv file and then email it every 24 hours using the smtp library. I wrote it using Pycharm and it is running on my laptop.
我使用 Pycharm 编写它,它在我的笔记本电脑上运行。 But, I want to know what's the easiest way to run it continuously on a cloud server(I have an azure subscription but any other way works) so that it it keeps collecting data and emailing it to me.
但是,我想知道在云服务器上连续运行它的最简单方法是什么(我有 azure 订阅,但任何其他方式都有效),以便它不断收集数据并将其通过电子邮件发送给我。 I don't have much knowledge about cloud so any help is appreciated.
我对云了解不多,因此不胜感激。
If you are using Azure I would first deploy your code on Azure serverless如果您使用的是 Azure 我将首先在Azure 无服务器上部署您的代码
Then set up a scheduler to run the code every n
hours!然后设置一个调度程序,每隔
n
小时运行一次代码!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.