There are several examples that we've used with customers that can help you get started. This has some examples on how to specifically evaluate logins outside of standard working hours. Take a look at these examples, then we can clarify your use case further.