如何在不使用 cron 作业的情况下在谷歌云中安排 python 脚本?

编程入门 行业动态 更新时间:2024-10-15 08:23:35
本文介绍了如何在不使用 cron 作业的情况下在谷歌云中安排 python 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有两个 python 脚本在本地环境中每天运行一次.一种是获取数据,另一种是对其进行格式化.

I have two python scripts running once a day in my local environment. One is to fetch data and another is to format it.

现在我想将这些脚本部署到 Google 的云环境并每天运行一次/两次.

Now I want to deploy those scripts to Google's cloud environment and run those once/twice a day.

我可以使用 Google Cloud Function 做到这一点,还是需要 App Engine?

Can I do that using Google Cloud Function or do I need App Engine?

为什么没有 cron 作业:因为我不希望我的系统/VM 运行一整天(不使用时).

Why NO cron job: Because I don't want my system/VM to run whole day (when not in use).

我可以使用 Cloud Composer 来实现吗?

Can I use Cloud Composer to achieve that?

推荐答案

您可以使用 Google Cloud Scheduler 这是一个完全托管的企业级 cron 作业调度程序.它允许您安排几乎任何作业,包括批处理、大数据作业、云基础架构操作.

You can use Google Cloud Scheduler which is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations.

每月前 3 个工作是免费的.接下来是每个工作每月 0.10 美元.

The first 3 jobs per month are free. Next are $0.10 per job/month.

更多推荐

如何在不使用 cron 作业的情况下在谷歌云中安排 python 脚本?

本文发布于:2023-11-24 00:13:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623276.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:作业   云中   脚本   情况下   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!