Many newer Android and iOS devices offer a "Do Not Disturb" option through the operating system settings.  During such periods, messages, email, notifications, and alerts may be blocked, or allowed from certain sources.

For Android Systems:

Navigate to: System > Sound and Notification > Notification > Do not disturb.

Scheduling can be 'checked' for "Turn on as scheduled".

The days and times can then be set.

Exceptions can be set to "Allow Exceptions".

Sounds, Vibrate mode can be selected.

Designated Contacts, Favorites, Calendar appointments, Clock alarms, and "warning" Apps can be allowed during the DND period.

For iOS Systems:

Navigate to: System Do Not Disturb

Scheduled can be enabled.

Calls can then be "allowed" under several setting options.