Start lxc time?

alberisca75

Member
May 25, 2021
3
0
6
48
Hi, is it possible to start and shut down an lxc or vm at a time set by the user? example start at 18 and turn off at 20!
 
hi,

you can have a cron job script calling the API, qm or pct tools can be used to start/stop VMs and containers respectively:
Code:
qm start VMID
qm stop VMID
and same for pct with container ID.
 
Hi, I guess you could use crontab to do this:

root@pve:# crontab -e

add the following:

0 18 * * * pct start <CT-ID>
0 20 * * * pct shutdown <CT-ID>
 
  • Like
Reactions: alberisca75

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!