Logic for scheduled task

I have a requirement to schedule a pipeline every 15 mins. This scheduled pipeline uses pipeline execute snap to execute a logic for each files that is picked up by the scheduled pipeline.

All the errors and success are handled within the Child Pipeline (configured in the Pipeline execute Snap). So in case of error in the child pipeline, still the transactions ends at output of the pipeline execute snap.

Now the ask is, the scheduled task should not pick the files in the next run if the previous run fails.

How to implement this?

Thanks and regards,
Sri

I just sorted, we can use the Snaplogic Read --> Mapper --> Snaplogic Update snap to disable the task.

Thanks and regards,
Sri