[lxc-users] How can i set a timing for my container ?
Yonsy Solis
yonsy.s.p at gmail.com
Tue Nov 7 17:50:55 UTC 2017
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
More information about the lxc-users
mailing list