This started as a 250+ line program I made to smelt items from one chest into another, but then I started getting rid of alot of the functionality to drastically reduce it's line count and efficiency, it's now under 50 lines and has support for a variable amount of furnaces and different fuels.
If one furnace is done before the other however it cannot re-task it until all the furnaces are done which I cannot see an easy way to do without timers and tables containing how much time each one has left etc...
Pastebin: https://pastebin.com/x7FVCisU
Code:
Spoiler
Usage:
Spoiler