Great job, Acrefawn!
However I'm having problems using the script with MiningRigRentals: when my rig is rented, MRR interrupts stratum connection and your script detects it and restars ccminer (switches servers):
[17.03.2018][20:49:29] [2018-03-17 20:47:15] Stratum connection interrupted
[17.03.2018][20:49:44] Pool server was switched to 0. Please check your Config_Cmnr.ini file carefully for spelling errors or incorrect parameters. Otherwise check if the pool you are connecting to is online.
However miner was already working again and there was no need to restart it:
...
[2018-03-17 20:47:13] [S/A/T]: 5/5430/5430, diff: 0.065, 44.21MH/s (yes!)
[2018-03-17 20:47:15] Stratum connection interrupted <-- my rig was rented by someone
[2018-03-17 20:47:30] [S/A/T]: 5/5431/5431, diff: 0.107, 44.20MH/s (yes!)
[2018-03-17 20:47:35] [S/A/T]: 5/5432/5432, diff: 0.067, 44.20MH/s (yes!)
[2018-03-17 20:47:39] xevan block 46796, diff 65.174
[2018-03-17 20:47:43] [S/A/T]: 5/5433/5433, diff: 0.067, 44.20MH/s (yes!)
[2018-03-17 20:47:50] [S/A/T]: 5/5434/5434, diff: 0.200, 44.20MH/s (yes!)
[2018-03-17 20:47:56] GPU#0:Found 2nd nonce: 05921de7
[2018-03-17 20:47:56] [S/A/T]: 5/5435/5435, diff: 0.423, 44.21MH/s (yes!)
[2018-03-17 20:47:56] [S/A/T]: 5/5436/5436, diff: 0.423, 44.21MH/s (yes!)
[2018-03-17 20:48:00] [S/A/T]: 5/5437/5437, diff: 0.168, 44.21MH/s (yes!)
[2018-03-17 20:48:01] [S/A/T]: 5/5438/5438, diff: 0.514, 44.21MH/s (yes!)
[2018-03-17 20:48:11] [S/A/T]: 5/5439/5439, diff: 0.095, 44.21MH/s (yes!)
[2018-03-17 20:48:17] [S/A/T]: 5/5440/5440, diff: 0.096, 44.21MH/s (yes!)
[2018-03-17 20:48:23] [S/A/T]: 5/5441/5441, diff: 0.207, 44.20MH/s (yes!)
[2018-03-17 20:48:55] xevan block 46797, diff 70.295
[2018-03-17 20:49:00] [S/A/T]: 5/5442/5442, diff: 0.074, 44.21MH/s (yes!)
[2018-03-17 20:49:06] [S/A/T]: 5/5443/5443, diff: 0.639, 44.21MH/s (yes!)
[2018-03-17 20:49:09] [S/A/T]: 5/5444/5444, diff: 0.092, 44.21MH/s (yes!)
[2018-03-17 20:49:09] [S/A/T]: 5/5445/5445, diff: 0.195, 44.21MH/s (yes!)
[2018-03-17 20:49:12] [S/A/T]: 5/5446/5446, diff: 0.085, 44.21MH/s (yes!)
[2018-03-17 20:49:12] [S/A/T]: 5/5447/5447, diff: 0.108, 44.21MH/s (yes!)
[2018-03-17 20:49:14] [S/A/T]: 5/5448/5448, diff: 0.155, 44.21MH/s (yes!)
[2018-03-17 20:49:22] [S/A/T]: 5/5449/5449, diff: 0.175, 44.21MH/s (yes!)
[2018-03-17 20:49:31] [S/A/T]: 5/5450/5450, diff: 0.068, 44.21MH/s (yes!)
[2018-03-17 20:49:34] Stratum difficulty set to 32 (0.12500)
[2018-03-17 20:49:34] xevan block 46798, diff 72.021
here log file interrupts because miner was restarted.
Please suggest what should I replace in the .bat file to avoid this in the future.
Thanks very much.
PS: donated sime mining time to you on March 17