This is a useful snippet that has a number of uses. I’ve used it in the past to remind clients of scheduled maintenance and even once as an effective (yet friendly) reminder that a clients invoice is outstanding. I rarely reach for this one, but it’s useful to have available should the need arise.

function author_admin_notice(){
    global $pagenow;
    if ( $pagenow == 'index.php' ) {

    echo '<div class="notice notice-error">
          <h1><strong>Schedule Maintenance</strong></h1>
          <p>This is a friendly reminder that we will be carrying out some technical updates on the website on Thursday at 9am.</p>
          <p>The maintenance will last for around an hour. Please refrain from making changes during this time.</p>
add_action('admin_notices', 'author_admin_notice');