Actual script does not check if the scheduled pipeline is active or not. This MR introduce a if statement and fetch info just for active pipelines.