I usually bring the chat in, check a schedule and then make a decision of an auto-reply with a closed message or sending it through to the queue. I also find it a much better experience just to check the schedule in the widget before it is presented to the customer so they don't even get to start the chat after hours. This is explained in the developer center at:
https://developer.mypurecloud.com/api/webchat/schedules.html. This is the best way to handle schedules.
------------------------------
Robert Wakefield-Carl
Avtex Solutions, LLC
Contact Center Innovation Architect
robertwc@avtex.comhttps://www.Avtex.comhttps://RobertWC.Blogspot.com------------------------------