Question: Dose the project stop when it hits 12 hours of constant ping?

I had this question because I was doing a giveaway.js commands and I set it to 1 day and it are ready hit/passed the time where it should Annonce the person but it never did and I have recheck all my codes and should work perfectly.
And it Check uptime robot and it was working 100% uptime. What do I do?

Hi @rashed0943,

Welcome to the Glitch Support Forums!

Did you set Uptime Robot’s pinging interval at 1 day? You should have set it at 5 minutes because Glitch projects that are inactive for 5 minutes automatically sleep. Setting it to 1 day is of no use.

Regarding “Does the project stop when it hits 12 hours of constant ping?”, yes. That particular technical restriction of Glitch states that

Projects sleep after 5 minutes if they are not used, and those running for more than 12 hours are stopped. They wake again when they receive another HTTP request to the project’s address.

So when you set Uptime Robot to 5 minutes, the project will not sleep, but when it’s active for more than 12 hours, it made to stop. But it’ll wake again “when they receive another HTTP request to the project’s address” (that is after 5 minutes.)

Hope this helps!

1 Like

That information dose rlly help thanks but I am sad that it’s stops at 12 hours cus then the bot mdoesn’t pick the winner after the time and the uptime robot is set to 5 minutes are ready.
But thanks anyways :+1:

1 Like

No, it does stop at 12 hours but then it starts again after 5 minutes!

1 Like

Oh, well thanks anyways, ili think Of changing host!

If you think of using the Pro plan of Uptime Robot, then you can get pinged every 1 minute, and it’ll start after 1 minute when it’s stopped for running for more than 12 hours. And there are plans in Glitch to add an Always On paid feature in the feature, so stay tuned!

Oh, never knew that.

And I don’t recommend switching from Glitch to another platform because I don’t think there any other services that provide so much options to code for free!

True but ili still keep the look out for one.

1 Like

Hey @rashed0943

When you make the Uptime Robot Intervals for 5 Mins, that means that it ping the website or the bot
every 5 minutes, making it 24/7

And if you don’t put it on Uptime Robot, it shuts off after 3 hours.

@HeemPlayz, why would it go to sleep after 3 hours if you don’t put Uptime Robot??? Actually, Glitch projects go to sleep after 5 minutes, not 3 hours!

try to hit your website using this code in your nodejs code

 setInterval(() => {
 }, 280000);

This will hit your website every 4 minutes 40 seconds so your bot wont go to sleep every 5 minutes. Now the problem occurs for hard sleep that is after 12 hours so use uptime bot to hit your website every 12 hours so that your project dont go to sleep

1 Like

Ili try that, to see if that works.

It is not idea to depend on your local container to keep itself alive. I recommend using a service like uptime robot.

You can run 2 bots that overlap with each other to ensure you get all of the winners and take the union of the sets of people.

That’s a cool idea and all, although how would you know which of the instances would handle which guilds? If I’m correct I think what you are trying to do is creating two projects that expose a web server and ping each other?

Actually Im trying to make it so that there’s always one bot online and they can both count the people that enter the giveaway and in the end you can put the lists together and remove the duplicates.

In that case I recommend you looking into manipulating discord.js shards.