On 11/07/2017 12:08 PM, Thouraya TH wrote:
Hi all,

Please, how can i fix a timing for my container ?
I'd like to start my container for 20 secondes (for example) and stop it.

the delay is dynamic. Some time is 20 secondes, other clients chose running a container for one hour.

inside your container you can execute:

shutdown -P now

and this will halt and "turn off" your container with LXD, i imagine that the same will happens with LXC.

if the requirement is from the host, with LXD you can do:

lxc exec container -- shutdown -P now

for the same scenario.

You can put this in a crontab, in the host and/or the container

--
Yonsy Solis

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to