Daniel McNeil
03/08/2023, 11:12 PMJon
03/14/2023, 2:26 PMKevin Wang
04/27/2023, 2:35 PMDaniel McNeil
04/27/2023, 3:38 PMThanks for reaching out to us. There isn't a specific command to stop an agent once it's been started beyond interrupting the process manual or killing the process that's running it. That said it's relatively straightforward to check for running flows via the CLI with this command prefect flow-run ls --state RUNNING, this is also doable from the API so it should theoretically be possible to write a script that kills the agent process if there are no currently running flow runs but to my knowledge there's nothing built natively into the agent process to do this.
jawnsy
04/27/2023, 6:18 PMDaniel McNeil
04/27/2023, 7:13 PMKevin Wang
05/19/2023, 6:35 PMJon
05/24/2023, 12:32 PM