Prevent your Mac from going to sleep mode for any time period you like.
Immediately schedule Mac shutdown with minimum effort.
UI Actions -"Universal Attachability" for AppleScript.