---
title: How to Schedule Server Downtime Notifications with Wall Command
description: "The `wall` command in Linux is used to send broadcast messages to all logged-in users. It can be very useful for notifying users about upcoming server downtime, maintenance activities, or other urgent issues. Please see [this article](https://truehost.com/support/knowledge-base/understanding-how-to-use-the-wall-command-in-linux/)on the command before…"
url: "https://truehost.com/support/knowledge-base/how-to-schedule-server-downtime-notifications-with-wall-command/"
updated: "2024-11-06"
category: Cloud servers in Kenya
---

# How to Schedule Server Downtime Notifications with Wall Command

The `wall` command in Linux is used to send broadcast messages to all logged-in users.

It can be very useful for notifying users about upcoming server downtime, maintenance activities, or other urgent issues.

Please see [this article](https://truehost.com/support/knowledge-base/understanding-how-to-use-the-wall-command-in-linux/)on the command before you can use it to send notifications

In this article we will look at the following;

- Use the `wall` command to send a basic notification.
- Schedule notifications for downtime using `cron`.

#### 1. Using the `wall` Command

- The syntax of the command is quite direct as illustrated **[here](https://truehost.com/support/knowledge-base/understanding-how-to-use-the-wall-command-in-linux/)**. The wall command need to be run by a **sudo user** or by user **root**.

```
sudo wall "Put your message here"
```

- For example

```
sudo wall "We have scheduled a transfer from this server from 6 PM"
```

- This message will be sent to all logged-in users, displaying immediately on their terminals.

![](https://truehost.com/support/wp-content/uploads/2024/11/image-62.png)

#### 2. Scheduling Notifications with `cron`

- To automate notifications, you can schedule `wall` messages using `cron`. This allows you to set up recurring or one-time notifications, ideal for planned maintenance reminders.

##### **Step 1: Open Your Crontab**

- To edit your crontab, use the following command:

```
crontab -e
```

- This opens the crontab file for the current user.

![](https://truehost.com/support/wp-content/uploads/2024/11/image-64-1024x201.png)

##### **Step 2: Add a `wall` Notification**

- Each cron job has the following structure:

```
* * * * command_to_execute
```

- The five asterisks represent the **minute**, **hour**, **day** of the **month**, month, and **day** of the **week** (in that order).
- For example, to schedule a message for 2:45 PM on the 6th of each month, you’d add the following line:

```
45 14 06 * * sudo wall "Reminder: Server maintenance will begin at 3:00 PM. Please save your work."
```

![](https://truehost.com/support/wp-content/uploads/2024/11/image-63-1024x170.png)

- The above command will run at 2:45 PM on the 6th of every month, sending a reminder message to all logged-in users.
- You can adjust the time and message as needed for your specific downtime schedule. Please check **[this platform](https://crontab.guru/)** to help you with determining the time correctly

##### **Step 3: Save and Close**

- Once you’ve added your message, save and close the crontab file. Your scheduled message will now run at the specified time.

**Note that you can also have your message saved to a file, then you put a cron to run the file, instead of the message itself, at your preferred times. Details about this are explained in [this article.](https://truehost.com/support/knowledge-base/understanding-how-to-use-the-wall-command-in-linux/)**

#### Example Use Cases for Scheduled Downtime Notifications

- You can have your message schedules daily, weekly, monthly or art specific times according to your need. Again check **[this tool](https://crontab.guru/)**for guidance.

1. **Daily Reminders**: Notify users daily of a recurring maintenance window.

```
0 22 * * * sudo wall "Reminder: Server maintenance window is from 11:00 PM to 12:00 AM."
```

2. **Weekly Notifications**: Send a message every Monday morning to remind users of weekly updates.

```
0 9 * * MON sudo wall "Weekly updates will occur today at 10:00 AM. Brief downtime may be expected."
```

3. **One-Time Notifications**: For a specific date, such as December 15 at 5:00 PM.

```
0 17 15 12 * sudo wall "Server maintenance scheduled for December 15 at 5:00 PM."
```

## Author's Final Word

Using the `wall` command with `cron` makes it easy to automate and schedule server downtime notifications, ensuring users are always informed about upcoming maintenance. By setting up scheduled notifications, administrators can improve communication with users and reduce potential disruption during server maintenance windows.
