如何在不使用cron作业的情况下在Google Cloud中安排python脚本? [英] How to schedule python script in google cloud without using cron jobs?

查看:119
本文介绍了如何在不使用cron作业的情况下在Google Cloud中安排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作业的情况下在Google Cloud中安排python脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆