Restarting the print spooler generally doesn't drop print jobs it just stops accepting new ones. End users will notice but it won't be as bad as silently dropping a print job. In general I would say it is safe to restart the service on the fly.
More importantly I wanted to share this with you:
Occasionaly I've had experience with a corrupt print job in a printer queue. In those cases I've noticed
a. The print spooler won't stay started as long as the corrupt print job is present and the target printer is on
b. the print spooler won't let you delete the corrupt job through the GUI if the spooler is stopped
c. the printer won't print any other job until the corrupt job is completed or deleted.
To fix this you have to
- Physically turn off the printer
- start/restart the print spooler
- delete the corrupted print job
- turn on the printer
If you don't do 1-4 in exactly that order you get stuck in an endless loop fighting with a-c.
I can't promise you that your situation matches this experience but I think its worth considering the behaviour observed and the implications to how the process of printing/print spooling hands things along.
edit: In the opposite take to Evan's manipulation of the spool files. You can use the print queue on Windows (start - settings - printers or start - printers) and delete the job from the print queue using the Document menu - Cancel option.
The key is in his way of dealing with it the spool service has to be stopped in dealing with it my way the spooler has to be started. If you have physical access to the printer and it is convenient to turn it off you can use my method. If you don't have access to the physical printer you can use his method.
You can store spool files jobs on another disk (a fast & big one).
Looks like on Windows 7 it has been removed from gui. So you can do that from the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers
edit value for DefaultSpoolDirectory
Double check all printers are in 100 or 1000 full duplex. Same for computers.
Prevent printers from going to sleep mode.
Carefully choose the driver.
Exempt the DefaultSpoolDirectory from antivirus scan.
Format the ntfs partition that hold spool jobs in 64K.
Prevent the workstation from using intel speedstep or anything that will slow down cpu.
You going to do same things thousands of times. So you must check each step to check if it can go a bit faster
Best Answer
I didn't tested it, but on Windows 8 and above you could create and push a powershell script that would look like that:
On Windows 7 Get-Printer is not defined, but you could bypass the problem with running a line like that in powershell to replace get-printer: