Use Javascript Infinity instead of pow(10, 100). Add output error when no valid schedule found.