As suggested here, I wonder if it is possible to provide autoconnection to shutdown interface to this snap https://snapcraft.io/powerscheduler.
Basically it is a shutdown scheduler that can be managed invoking an API. It does just that: shutdown a machine at certain time. At the moment I tested it with Ubuntu and Ubuntu Core, but I will soon perform tests on other distros as well.
The scheduler is written in Python and use this module.