简体   繁体   English

如何在不使用完整服务器或 ec2 实例的情况下在 cronjob 中运行 python 脚本?

[英]How can i run a python script in cronjob without utilising the full server or ec2 instance?

I have a python script which is suppose to run every minute, i know how to setup a cron for the same on any server, but that will take a full resource in aws like an ec2 instance, is there any other solution, like lambda?我有一个假设每分钟运行一次的 python 脚本,我知道如何在任何服务器上为它设置一个 cron,但这将像 ec2 实例一样在 aws 中占用全部资源,有没有其他解决方案,比如 lambda? or may be something else on AWS?或者可能是 AWS 上的其他东西?

Yes, you can use AWS Lambda with Scheduled Events .是的,您可以将AWS Lambda 与 Scheduled Events 结合使用

Write a Python Lambda function and then direct AWS Lambda to execute it on a regular schedule.编写一个 Python Lambda 函数,然后指示 AWS Lambda 定期执行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM