Running Homelab On Schedule
#HomeLab
I don't need my homelab running 24/7.
That's why I made it run on schedule. It started up in the evening when I usually needed to make a backup and then it automatically shut down:
- I used a "power on by RTC Alarm" to wake the host up.
- To shut it down I used a scheduled cron job which suspended containers and VMs gracefully and then shut down the host.
In theory, it works perfectly. On practice in works until the MacOS [[Time Machine]] fails to backup at least once.
Once it fails for the first time it starts to behave weirdly and sometimes stops doing backups anymore. Sometimes it gets stuck forever or the backup time grows insanely. Sometimes it starts failing at some point or doesn't observe the backup drive at all. Since I was having a server running on schedule there was a high chance that it would shut down right in the middle of the stuck [[Time Machine]] backup, which made things even worse.
I faced it a few times, tweaked the schedule, and increased working hours until I concluded that there always would be a case that wouldn't fit the schedule. That's how 24/7 turned out to be the way to go.
Comments