Proxmox timer to shutdown server

ruffpl

Active Member
Jan 11, 2020
37
2
28
40
Lets say that I would like to shutdown my server f.ex everyday at 1.00 at night and I want all drives and VMs to perform soft close without any errors. Later server could power on by timer which was set in bios. Any easy way to install some power off timer in Proxmox (or maybe something like that in some future update?) or the only way is to write some script and save it inside some Proxmox folder (sorry but I have never done that)
 
Last edited:
The /usr/sbin/shutdown command (run from the console or cron) will shutdown Proxmox in the same way as shutting down Proxmox from the web GUI. It also allows you to specify a specific time as well. This is a well known Linux command and there are other threads on this forum and other places on the internet about it.
 
And you don't need to shutdown guests before that. Just add a 0 1 * * * root /usr/sbin/shutdown -h now to /etc/crontab and it should shutdown the server each day at 1 at night. But keep in mind that this won't check if important tasks are still running that might be aborted by that. Like backups jobs, ZFS scrubs, ZFS resilvering, ...
Best would be to write a script that really checks all those things and only shuts the server down when noting important is running.
 
Last edited:
And you don't need to shutdown guests before that. Just add a 0 1 * * * root /usr/sbin/shutdown -h now to /etc/crontab and it should shutdown the server each day at 1 at night. But keep in mind that this won't check if important tasks are still running that might be aborted by that. Like backups jobs, ZFS scrubs, ZFS resilvering, ...
Best would be to write a script that really checks all those things and only shuts the server down when noting important is running.
what does 0 1 * * * root stand for? should I change it to something else or keep it the same?

thank you.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!