---
title: "Gateway - What causes the error \"startTime must be earlier than the endTime\""
description: "The error occurs when the startTime is not earlier than the endTime in active time settings. Disabling the endTime in the first schedulePeriod allows active time to span through midnight correctly."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004023625-geneos-gateway-what-causes-the-error-starttime-must-be-earlier-than-the-endtime/index.html"
---
## Start of day

The error appears when configuring an active time that has an [endTime](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/gateway_active_times/index.html#activeTimes_activeTime_schedulePeriod_endTime) setting value of **00:00:00** because the said value means *start of day*:

![Active time start of day](https://docscdn.itrsgroup.com/faq/images/geneos/115004023625-inline-1-active_time_start_of_day.png)

## Active time that spans through midnight

The said error usually happens when configuring an active time that spans through midnight. This configuration can be achieved by disabling the *endTime* setting of the first *schedulePeriod* entry. When the said setting is disabled, the active time treats this as *end of day*:

![Active time end of day](https://docscdn.itrsgroup.com/faq/images/geneos/115004023625-inline-2-active_time_end_of_day.png)


