Last active
November 27, 2023 06:28
-
-
Save RodolfoFerro/a12c664330c6eae601e5a828adfb8306 to your computer and use it in GitHub Desktop.
Stop Colab from disconnecting, 2021.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ClickConnect(){ | |
console.log('Working'); | |
document.querySelector('colab-toolbar-button#toolbar-add-text').click(); | |
} | |
intervalTiming = setInterval(ClickConnect, 60000); |
Thks, works well :)
but how to stop it afterwork ?
best,
Hello @Elzic6!
Since we created the variable intervalTiming
, we can just stop it by doing:
clearInterval(intervalTiming);
now we are getting the message even with your script:
"Colab is for interactive use. Please confirm that you are present to continue"
Any workaround?
Any updates on this?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These scripts help to stop Colab from disconnecting, in 2021.
The script in
click_connect_button.js
clicks the connect button every minute.The script in
create_text_cell.js
just adds a text cell by clicking the toolbar every minute.you can modify the time in the
setInterval
function.