Can I force my project to go to sleep?

I am setting something up and I need to test that it actually works even if my project has to wake up from sleep. Is there any way to force my project to sleep to check if it still works? I know I can wait 5 min but I was hoping I could do it without waiting every time I need to test

Thanks

1 Like

Hey @bit you can call

curl --request POST \
  --url https://api.glitch.com/projects/$PROJECT_ID/stop \
  --header 'authorization: $YOUR_TOKEN' \
  --header 'content-type: application/json'

You can find $YOUR_TOKEN by running JSON.parse(window.localStorage.cachedUser).persistentToken in the browser console for an Editor window for your project. Your $PROJECT_ID should also be displayed there.

Let me know if you need more information about any of that - I’d be happy to explain further.