# Umbrel schedule shutdown

**URL:** <https://community.umbrel.com/t/umbrel-schedule-shutdown/18814>\
**Category:** General Discussion\
**Created:** [August 13, 2024, 3:19pm UTC](https://community.umbrel.com/t/umbrel-schedule-shutdown/18814 "2024-08-13T15:19:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohitjawaledsnr](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@rohitjawaledsnr](https://community.umbrel.com/u/rohitjawaledsnr)\
**Post date:** [August 13, 2024, 3:19pm UTC](https://community.umbrel.com/t/umbrel-schedule-shutdown/18814/1 "2024-08-13T15:19:04Z")

</div>

Is there anyway to schedule shutdown. As umbrel is server , this should have scheduling shutdown restart.

---

<div class="post-metadata">

**Author:** ![denny](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/denny/32/6330_2.png) [@denny](https://community.umbrel.com/u/denny)\
**Post date:** [August 13, 2024, 8:29pm UTC](https://community.umbrel.com/t/umbrel-schedule-shutdown/18814/2 "2024-08-13T20:29:08Z")

</div>

Hey, you could try this:

Connect to your Umbrel server via SSH and use the shutdown command to schedule a shutdown. For example, to schedule a shutdown at 10 PM, you can use:

`sudo shutdown -h 22:00`

You can also specify a shutdown in a certain number of minutes. For example, to shut down after 30 minutes:

`sudo shutdown -h +30`

If you need to cancel a scheduled shutdown, you can use:

`sudo shutdown -c`

If you want to schedule a shutdown at a regular interval, you can use a cron job. Edit the crontab file with:

`crontab -e`

Add a line to schedule the shutdown. For example, to schedule a shutdown every day at 10 PM, add:

`0 22 * * * sudo shutdown -h now`

These commands should allow you to manage the scheduling of your Umbrel OS server shutdowns effectively.

To schedule a shutdown inside a Docker container, you typically need to handle it differently since Docker containers are intended to run a single process and shut down when that process ends. However, you can still schedule a shutdown using the same basic principles. Here’s how you can do it:

First, access the Docker container where you want to schedule the shutdown:

`docker exec -it <container_name> /bin/bash`

Replace \<container\_name\> with the name or ID of your container. Run `docker ps` to find the container ID.

Inside the container, you may need to install cron:

`apt-get update`  
`apt-get install cron`

Inside the container, use crontab to schedule the shutdown:

`crontab -e`

Add a line to schedule the shutdown. For example, to schedule a shutdown every day at 10 PM, add:

`0 22 * * * shutdown -h now`

Save and close the crontab file.

Start the cron service inside the container:

`service cron start`

---

<div class="post-metadata">

**Author:** ![rohitjawaledsnr](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@rohitjawaledsnr](https://community.umbrel.com/u/rohitjawaledsnr)\
**Post date:** [August 14, 2024, 4:45am UTC](https://community.umbrel.com/t/umbrel-schedule-shutdown/18814/3 "2024-08-14T04:45:55Z")

</div>

Thanks for quick response,  
Yes this commands would work but ,  
is there any app to schedule shutdown, because it’s just convenient to use.

Also thank you so much for explaining these commands ,i appreciate your time.

---

<div class="post-metadata">

**Author:** ![denny](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/denny/32/6330_2.png) [@denny](https://community.umbrel.com/u/denny)\
**Post date:** [August 14, 2024, 7:50pm UTC](https://community.umbrel.com/t/umbrel-schedule-shutdown/18814/4 "2024-08-14T19:50:13Z")

</div>

Unfortunately, there is currently no app or setting that can do this. 😩

Perhaps the developers @mayank @nmfretz @lukechilds @smolgrrr can add this to the agenda? 💪
