Automating scheduler design for Networked Control Systems with Event-Based Control