To Shutdown Linux after a certain amount of time use command –

shutdown -h + <time in minutes>

example: shutdown -h + 5

And suddenly if u decide to cancel ur deed then just use –

shutdown -c