Text this: An algorithm for joint optimization of dynamic routing and scheduling in time-sensitive networking