#Is it possible to shutdown and start a Pod via .sh script and Cron?
18 messages · Page 1 of 1 (latest)
Yes you could, use runpodctl pod stop $podid
Replace pod id with environment variables from the runpod docs
Check for a list in the docs, for environment variables existing in pods
thanks
🙂
this also means, everytime the pod is stopped and in idle mode and started again, the pod gets a new ip? while the pod is stopped i cannot connect via terminal ie?
Yes but the http ports stay the same
nvm 😄 all fine
with api it should be fine
#!/bin/bash
API_KEY="key"
POD_ID="pid"
curl -s -H "Content-Type: application/json"
-H "Authorization: Bearer $API_KEY"
-X POST "https://rest.runpod.io/v1/pods/$POD_ID/start"
echo "Pod wird gestartet"
could this work ?
as under API keys we only have .graphql and.ai ..
were do i get my rest api key ?
Is it even possible from outside? like another VM ( not RunPod.io glaibal network )
ok, then were do i get a rest api key?
all i can create here is /graphql endpoint and runpod.ai
I think it's the lower part, without graphql text is the permission for that rest api