Hi :wave::wave::wave: Is there a command in a Pref...
# prefect-community
Hi 👋👋👋 Is there a command in a Prefect flow that will stop (kill) the current agent? To give some context, our agent is a cron job in Render (Heroku alternative) that wakes up for time to time and starts the agent to process flows. But we don't need it to run all the time, so after it got a flow from a queue and flow is done, we want the agent to stop (and then the cron job in Render will also stop). I think process.kill in the end of the flow might work but seems a bit wrong.
👋 1
I'm not very familiar with Heroku, but if you deploy your agent with e.g. AWS EC2 you could leverage EC2 instance schedule to schedule the instance (with your agent) to be on only during certain hours and shut it down when not needed. https://aws.amazon.com/solutions/implementations/instance-scheduler/