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?

  • Does the user which the task runs as have a default printer selected? – jscott Apr 1 '16 at 18:53
  • yes, that user has that printed as default selected – orangutangas Apr 4 '16 at 5:15

If permissions are ok, then probably the network printer is not correctly configured in Windows for the user account which is used to run the script; try logging on to the computer using that user account, manually adding the network printer and setting it as the default printer: this should make sure everything is configured correctly.

Also, while you are logged in as that user account, print something; if there are other issues preventing that user from printing, they will become immediately apparent.

  • No this is something different...I have tried to install pdf architect. It allows to print to a folder document. When i launch my cmd file, document is printed and when i try to launch it through Task Scheduler there is nothing printed despite i added user account into printer... And task scheduler shows me an message that task completed – orangutangas Apr 4 '16 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.