You can create your own power plan from
Control Panel\All Control Panel Items\Power Options\Create a Power Plan
where you can unset sleep and hibernation timer(set to zero), then start your program from cmd file that contain command to switch to sleepless plan and restore it when you done.
When you created your sleepless plan, list all power plans by running from command line following command:
powercfg -LIST
that will return something like this:
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)
then write somewhere GUID strings for sleepless and usual plan and create cmd file like:
@echo off
:: Below activating sleepless plan, replace GUID with plan you created
POWERCFG -SETACTIVE 8c5e7fda-e8bf-xxxx-xxxx-xxxxxxxxx
\Path\to\your\program
:: Restore usual power plan
POWERCFG -SETACTIVE 381b4222-f694-41f0-9685-ff5bb260df2e