The problem with that is, how will you know when the shut down comes?
How could you schedule it before a shut down if you don’t know when the shut down is coming?
If you shut down at the same time every day, just use task manager
If you leave OneDrive, running all the time, it should be backed up before you shut down or is your database not located in the OneDrive space