Running google colab every day at a specific time

You need to create a notebooks.csv listing all the Colaboratory URLs. Then use colabctl to run each notebook (In order, synchronously mentioned in the CSV) and then pauses for a period of n seconds of time before running them again.

You can then run python colabctl.py <end-string> <sleep-seconds>,

There’s a gCookies.pkl file in the repo. Ensure that your local Python version is the same one as used to create this serialized pkl file.

Ref: https://github.com/TensorTom/colabctl

Now that we have a notebook and script ready, next is to be able to SSH into Google colab.

  • create an account on ngrok.com
  • Copy and paste below code in colab which installs ngrok and creates a tunnel for us

Source : https://gist.github.com/yashkumaratri/204755a85977586cebbb58dc971496da#file-google-colab-ssh

  • Now, on your local machine, open terminal and SSH to connect to the Colab System.

ssh root@0.tcp.ngrok.io -p <port_num_generated_above>

Now you have access to the whole system through SSH terminal. And can continue to use colabctl to any other corn script on local environment to execute your remote colab script.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)