First we can configure virtual machines and containers to start up and shutdown with the host.
Select The Vm -> go to option tab
enable the -> start up boot to yes
next configure the start/shutdown order
Start order = 1or any (order to start)
Start up delay = 60 (sec interval between two node start)
Shutdwon timeout = 60 (sec interval between two node shutdown)
Second We go to crontab for schedule task execution command.
# crontab -l -> to list out the crontab schedule
# crontab -e -> to create a new crontab schedule
# crontab -r -> to remove all crontab schedule
# m h dom mon dow command
11 16 * * * /sbin/shutdown -h now
It should shutdown your machine at every day 4:11 PM
Select The Vm -> go to option tab
enable the -> start up boot to yes
next configure the start/shutdown order
Start order = 1or any (order to start)
Start up delay = 60 (sec interval between two node start)
Shutdwon timeout = 60 (sec interval between two node shutdown)
Second We go to crontab for schedule task execution command.
It consists of five parts
- minute
- hour
- day of month
- month
- day of week
Here is an illustration
# crontab -l -> to list out the crontab schedule
# crontab -e -> to create a new crontab schedule
# crontab -r -> to remove all crontab schedule
# m h dom mon dow command
11 16 * * * /sbin/shutdown -h now
It should shutdown your machine at every day 4:11 PM
0 Comments