CPU temperature is checked every 5 seconds.
If the CPU temperature exceeds the threshold, this script will forcefully terminate the specified command (which is believed to be the cause of the high temperature).
This script has been tested with Bash 5.2.32 and Zsh 5.9 on Arch Linux.
./dynamic-circuit-breaker.sh ${PROCESS}