Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Writing and scheduling a script to stop and then restart print spooler

Posted on 2004-10-21
Medium Priority
Last Modified: 2012-06-22
I am running terminal services on a Windows 2000 server SP4.  Every so often the spooler stops allowing users the ability to delete jobs stuck in the print queue.  An administrator must log in, stop and then restart the spooler service to clear print jobs already deleted in the queue.

Can anyone tell me how to setup and schedule a script that will stop and restart the print spooler (as an administrator) every 4 to 6 hours?

Question by:orther

Assisted Solution

nihlcat earned 1000 total points
ID: 12372168
Another expert has addressed this:


You'll want to set options in the Advanced button in the Schedule tab of your Scheduled Tasks
LVL 76

Accepted Solution

David Lee earned 1000 total points
ID: 12375852
Seems pretty simple.  Create a command file containing the following commands:

net stop spooler
net start spooler

Now create a scheduled job that runs the command file however often you want.  Set the job up under an account with admin rights.  Voila.

Expert Comment

ID: 12376140
You can even set the spooler to restart itself.  Its in the services properties.  What you really need to look at is the root of the problem.  Terminal services and Citrix can be very finicky about printing.  There are a few things you want to avoid.  Cheap printers, especially deskjet/inkjets.  Avoid auto printer creation whenver you can.  Also make sure all of your print drivers are current.  If you are printing to a bic copy/fax/scanner/email/espresso/food processor type machine, they often times you LPR.  I had this same problem and corrected it by installing print services from UNIX.

Author Comment

ID: 12413755
I actually tried both of these answers and they worked for me.  I finally just created a batch file to do the net stop spooler and net start spooler and scheduled them to run using Scheduler.  

Scheduler can be found by selecting Start, Programs, Accessories, System Tools, then Scheduled Tasks.  Follow the wizard and you should be good to go!

Thanks for your help.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
As a matter of fact, Outlook OST files are of much importance in relation to Exchange mailbox. OST files are independent as they are simply copy of data of a user’s mailbox on Exchange Server. Though, if the server’s status is changed or it is dama…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question