sv_maxuptimelimit

sv_maxuptimelimit <value>

If set, whenever a game ends, if the server uptime exceeds this number of hours, the server will exit.