Option to not sleep

I started defragging my Windows 10 laptop, then went to lunch. When I came back I found out my laptop had gone to sleep (it is set to sleep after 30 minutes when plugged in). Please add an option to prevent sleep/hibernation when it's defragging.