In some cases it's desirable to stop a pump prior to the schedule ending. This might be necessary in a pressurised system to ensure the system isn't under pressure when the last valve or riser closes.
To schedule the pump to turn off some time before the end of the schedule, click on the pump in the schedule editor to bring up the settings window:
Click on 'Stop at end of schedule' to bring up the end different options and select 'Stop earlier':
That will ensure the pump is scheduled to stop before the last valve or riser is closed.