You could do something like I described in the post linked below whereby Time Machine is activated and then, in my case, a user-configured delay is used before unmounting the drive. You could do similar, just adjust the delay appropriate for your setup and then replace the unmount action with a Shut Down action.