0

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?

pat o.
  • 1,919
  • 1
  • 16
  • 28

1 Answers1

0

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.

Massimo
  • 68,714
  • 56
  • 196
  • 319
  • 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 04 '16 at 08:20