Ask coding questions

← Back to all posts
Do I have to leave the tab open to run my script?
TacoSnack (0)

this is probably a dumb question But can I close the tab/turn off my pc while I'm running the script, or will that just stop the script?

Comments
hotnewtop
RYANTADIPARTHI (6001)

you can use always on to keep it on 24/7

Coder100 (17018)

yeah you do.

Unless you make a 'keepalive' script:
https://repl.it/talk/learn/Hosting-discordpy-bots-with-replit/11008

where you make an HTTP server so it can run on its own for an hour or so.

or just the always on option:

BD103 (126)

Depends on what you mean by "script". If you're talking about replit, then yes, you need to be on the page to keep a process running. After about five minutes of you not being on the repl, it will close itself. This does not apply to repls that are HTML, CSS, and JS because they are static webpages.