简体   繁体   English

如何在每天的特定时间持续运行Google合作实验室?

[英]How to constantly run Google Colaboratory at a specific time every day?

I recently have built a Python program that runs on Google Colaboratory that retrieves the data from a site. 我最近建立了一个可在Google Colaboratory上运行的Python程序,该程序可从网站检索数据。 Since I wanted to create a graph based on data of one month, I want to retrieve the data every day. 由于我想基于一个月的数据创建一个图形,因此我想每天检索数据。 Is there any way to run this on Google Colab, because my friend would like to fix the code at some time too? 是否可以在Google Colab上运行此方法,因为我的朋友也想在某个时间修复该代码? If not, is there a way to perform this on Windows 10? 如果没有,是否有办法在Windows 10上执行此操作? Thank you in advance. 先感谢您。

Colab doesn't support this currently. Colab当前不支持此功能。

For Windows 10, I think you're looking for the Task Scheduler . 对于Windows 10,我认为您正在寻找Task Scheduler

This has changed now that I created colabctl . 现在我创建了colabctl ,这已经改变了。

You can use colabctl to run your Google Colaboratory notebooks from the CLI, on a schedule if you wish. 如果需要,您可以使用colabctl从CLI按计划运行Google Colaboratory笔记本。 Simply add colabctl.py to a cron job. 只需将colabctl.py添加到cron作业中即可。

Note: If you want to run it on a headless server, you will first need to run it once from your desktop to save your login cookie to the pickle file and then upload that pickle to your server along with colabctl. 注意:如果要在无头服务器上运行它,则首先需要在桌面上运行一次,以将登录cookie保存到pickle文件,然后将该pickle与colabctl一起上载到服务器。

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

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