Create a task in schtasks to capture screen every 5 minutes and save file with timestamp In windows tasks scheduler put C:\Windows\SysWOW64\cmd as program/script add arguments /c C:\Users\User\Desktop\PythonScreenshot\testscreenshot.bat and start in C:\Users\User\Desktop\PythonScreenshot