I have a script, written in Python, that generates a PDF document and prints it to network printer. When I execute that script through the cmd line or launch executable .cmd
or .bat
file, it works nicely and prints document.
However, when I put that script to be launched via Task Scheduler, it shows that it has succeeded and task completed with no errors thrown. I tried to put that code in try/except
frame to see if any errors are shown but I still do not see any of them.
I went into 'Devices and Printers' found my network printer and added a user which is used in Task Scheduler when running the task but no documents were printed.
I found same printer in regedit
under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers
and also added same user which is used to run that task but it was fruitless.
Does anyone have any other solutions how I can print documents using Task Scheduler?