[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-10-21
4
Medium Priority
?
2,750 Views
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?

Thanks,
Mike
0
Comment
Question by:orther
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Assisted Solution

by:nihlcat
nihlcat earned 1000 total points
ID: 12372168
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
 
LVL 76

Accepted Solution

by:
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.
0
 
LVL 5

Expert Comment

by:snowsurfer
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.
0
 

Author Comment

by:orther
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.
Mike
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

649 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