简体   繁体   English

在Google云平台上定期运行node.js脚本的最简单方法是什么?

[英]What's the simplest way to run a node.js script periodically on Google's Cloud Platform?

I've written a node js script that does a scraping job (selenium) and logs the results to Google sheets (Google sheets api). 我编写了一个节点js脚本来执行抓取工作(selenium)并将结果记录到Google工作表(Google sheet api)。 I need to make the script run completely automatically- not me running it daily on my system. 我需要让脚本完全自动运行 - 而不是我每天在我的系统上运行它。 What would be the simplest way to put this on Google Cloud and automate it to run periodically- say twice a day? 最简单的方法是将它放在Google Cloud上并自动定期运行 - 比如每天说两次? I've taken a trial package of Google Cloud, but am not really familiar with the services so I'm not sure what would be the right choice for me. 我已经采用了Google Cloud的试用版,但我对这些服务并不是很熟悉,所以我不确定哪种选择对我来说是正确的。

Disclaimers: I'm not really a programmer- more of a hobbyist thus, technical complexity can be moderate at best and second. 免责声明:我不是一个程序员 - 更像是一个业余爱好者,因此,技术复杂性最好是温和的,第二个。 I'd need help with setting up the environment as well so walkthroughs or examples would really help. 我需要帮助来设置环境,所以演练或示例真的会有所帮助。

You could take a look at this documentation on how to deploy Node.js in App Engine. 您可以查看有关如何在App Engine中部署Node.js的文档 This documentation as well covers how to automate jobs on App Engine using Cron for Java. 文档还介绍了如何使用Cron for Java在App Engine上自动执行作业。

Hope it helps. 希望能帮助到你。

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

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