From Fin :
"Scale-to-Zero only looks at whether there’s any incoming traffic (and no held connections like WebSockets or HTTP/2 streams) during the idle period. It doesn’t consider “work happening inside the instance” as a reason to keep it awake.
So your script can keep running until the idle period elapses, then the service will scale down to zero and go to Sleeping."
This is incredibly stupid. There are many GPU/AI scenarios like training a model which require a running command shell for some length of time. There may not be HTTP traffic but the instance is still busy.
Please change this.