Can't find Always On and deployments aren't on 24/7

Question: I have a program that is an Instagram chatbot, and I need it to work 24/7. I am a member of Replit Core, but I can’t find the “always on” button. I tried using the deployment option, but the program stops after a few minutes of inactivity. Could you guide me on how to keep my chatbot active 24/7?

Repl link/Link to where the bug appears:

Screenshots, links, or other helpful context:

code snippet

Hey @agentia28 welcome to the forums!

Always on is deprecated. For bots you need a reserved VM deployment. What kind of deployment did you try?

6 Likes

Yes, I’ve tried the VM deployment, but despite this, after a few minutes of inactivity, if I want to use the program, I have to go to my repl and press the “RUN” button for the program to function again.

Hello @agentia28!

Deployments are not connected to your repl, so if you stop or run the repl from the workspace, it will not stop the Deployment.

1 Like

Okay, thank you @Fairies0feast for that clarification, but then what should I do to make my repl work 24/7, or in other words, how can I ensure that the ‘run’ never deactivates, because currently if I remain inactive for a few minutes, my Instagram chatbot stops working!

That shouldn’t be happening, are you sure your deployment is running?

Yes, here’s the issue: the deployment is active, but I have to manually click on ‘run’ every time to keep my chatbot operational. How can I improve this situation?

@Fairies0feast any suggestions please?

If the deployment is active, you should not be having an issue. Could you check the logs tab in the Deployments tab for any errors?

@Fairies0feast here is the logs tab,:point_up:another question : when the VM deployment is live, the ‘run’ button should automatically be active? Because, as of now, I have to do it manually every time… :cry: thank you for your time!

The deployment is not your local environment, and is not connected to the run button.

2 Likes

@Firepup650 Yes, that’s what I was thinking too. But despite the deployment, I have to press the run button every 15 to 20 minutes to keep the program running, which doesn’t meet the needs of an Instagram chatbot which needs to operate autonomously 24/7.

Ah it’s a chatbot. You probably need to switch to a reserved VM deployment for that.

@Firepup650 Yes☝️ I’m using a reserved VM deployment
Really I don’t understand why it’s not working, and why the program stops when the run button automatically deactivates

The run button would just be for developing and testing the bot, and isn’t related to the deployment.
Does this bot work on Instagram, without pressing the run button?

2 Likes

@NateDhaliwal thank you four your response, No If I don’t press the run button, the bot won’t work, even if the VM deployment is active.

1 Like

@NateDhaliwal any suggestion please ? :sweat:

Hi @agentia28 !
Is there an API code for the bot? Did you set it in the deployment secrets?

Thank you for your time @NateDhaliwal . Yes, there is an API and I have properly entered the secrets. When I press the run button everything works wonderfully, so the bot functions very well. However, as soon as I remain inactive for a few minutes and the run button automatically deactivates, the program stops working and I have to manually press run again for the bot to work anew.

Just to clarify, the bot won’t even run when the run button isn’t clicked?
Also, are you 100% sure that the secret is not the one in the Secrets tab, but the one that you enter when deploying?