[英]How to run a Python script online every N minutes?
To work a bit on my Python, I decided to try to code a simple script for my private use which monitors sites with offers and sends you an email whenever a new offer which you are interested in pops out. 为了在我的Python上工作,我决定尝试编写一个供个人使用的简单脚本,该脚本监视带有要约的网站,并在您感兴趣的新要约弹出时向您发送电子邮件。 I guess I could handle the coding part (extracting the newest one from HTML and such) but I've never really run online any script which requires being fired every N minutes or so.
我想我可以处理编码部分(从HTML等中提取最新的部分),但我从来没有真正在线运行过任何需要每N分钟左右触发一次的脚本。 What kind of hosting/server do I need to make my script run independently of my computer and refresh every, say, 5 minutes sending me an email when there's an update?
我需要什么样的托管/服务器来使脚本独立于计算机运行,并每5分钟刷新一次(有更新时向我发送一封电子邮件)?
If you have shell access, you an use crontab
to schedule a recurring job. 如果您具有外壳程序访问权限,则可以使用
crontab
安排重复作业。
Otherwise you can use a service like SetCronJob or EasyCron or similar to invoke a script regularly. 否则,您可以使用SetCronJob或EasyCron之类的服务或类似服务定期调用脚本。
Some hosters also provide similar functionalities in their administration interface... 一些托管人还在其管理界面中提供了类似的功能...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.