Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2857
  • Last Modified:

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

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?

Thanks,
Mike
0
orther
Asked:
orther
2 Solutions
 
nihlcatCommented:
Another expert has addressed this:

http://www.experts-exchange.com/Operating_Systems/Win2000/Q_21131042.html

You'll want to set options in the Advanced button in the Schedule tab of your Scheduled Tasks
0
 
David LeeCommented:
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.
0
 
snowsurferCommented:
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.
0
 
ortherAuthor Commented:
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.
Mike
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now