You can also use Microsoft's set of tools, PowerToys, to prevent Windows 10 from sleeping. Prevent Windows 10 from sleeping with PowerToys That is how you prevent Windows 10 from sleeping without third-party tools. After you have finished all tasks, repeat the steps above and set a smaller period, for example, 1 hour.
You can also get there by pressing Win + I and navigating to System > Power Options. Prevent Windows 10 from sleeping with PowerToys Prevent Windows 10 from going into sleep mode