This is the command to check if idle ....
curl http://10.0.0.2:8089/dvr | grep "busy\":false"
curl http://10.0.0.2:8089/dvr | grep "busy\":false" && curl -XPOST http://10.0.0.2:8089/providers/tve/mvpds/Comcast_SSO/scan?all=true -o TVEChannels.txt