SOS: a shell for opportunistic scheduling in manufacturing environments