You could certainly define a shutdown script with local policy to invoke your backup, but the time of day logic would need to be in the script itself. If the earliest you'd want a backup upon shutdown is 4 PM, that could be as straightforward as:
Code:
if /i %time% LSS 16 goto EOF
<backup command(s)>
And if you need more flexibility there's always PowerShell.
Regarding the task scheduler, while you could define a trigger on the User32 event ID 1074 in the System log, I'm not sure if that would give your backup enough time to complete.