This is one of most common alerts and is easily done with use of Energy Logserver. Even more – such alert is already predefined and placed in installation package by default. For Windows users we detect night logons.
This has been applied in our previous deployments for Linux users or users from dedicated services which are not related to specific operating system.
Such rule configuration can hardly be simpler:
More than that we can add to calendar option to every alert, so such alert will be triggered based on crontab format, for example:
calendar: schedule: "* 0-8,16-23 * * mon-fri"