Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Scripts If you need or have any scripts then get 'em here.

Go Back   EduGeek.net Forums > Coding and Web Development > Scripts
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 16-06-2009, 05:40 PM   #1
 
contink's Avatar
 
Join Date: Jul 2006
Location: South Yorkshire
Posts: 3,570
uk uk yorkshire
Thanks: 245
Thanked 252 Times in 187 Posts
Rep Power: 74 contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future contink has a brilliant future
Post Print spooler management

This is a script I had to dig out again recently so I thought I'd share it for anyone in a similar position.

I have a few schools where the teacher sends a really big job that just b*ggers everything up or the spooler dies because of some driver clash (or similar) so again the printers just stop showing up and nobody can print.

Whatever it is, you obviously don't want the spooler sat there with jobs piling up like a stream of abandoned cars on the M11.

Enter my script, and how it works is this...

You have one custom variable "StallTime" which you can define in the script. (The script will assume a stalltime of 20 minutes if you don't set one)

This is the "line" that the script will use as a measure as to whether a job has stalled and requires action.


The process works as follows:

1. Are the Spooler and LPDSVC services are running... If not it will start them
2. Is the current job older than the stalltime value with a status of "printing"? If yes it stops the services, kicks the first job then restarts the services again.

It is possible to have the script restart the queue leaving the first job to try again but I found that had unintended consequences with staff submitting huge print jobs being restarted. The fact that they were hogging the printer was irrelevant at the time.

Now the script just kicks their job off the system if it's still going after (in my case) 10 minutes.



To use this as an automated script, simply add it to the scheduled tasks and set it to run every 10 minutes. I usually start and stop it at 8:45am and 15:30pm so that staff can print their biiig jobs before or after school (You see I can be nice occassionally)

Hope this one helps..

Martin
Attached Files
File Type: vbs printer-queue-mgmt.vbs (4.1 KB, 17 views)
  Reply With Quote
Reply

EduGeek.net Forums > Coding and Web Development > Scripts

Similar Threads
Thread Thread Starter Forum Replies Last Post
print spooler cleaner util ? mac_shinobi Windows 11 28-05-2009 11:07 AM
Print Spooler shut off on print jmair Windows 3 29-08-2008 01:52 PM
Print Spooler Nitemare Help Please!! edsa Windows 14 11-11-2007 06:24 PM
Print Spooler on Print Server drewinc Windows 8 22-05-2007 09:02 AM
XP Print Spooler Nij.UK Windows 5 16-05-2006 10:13 AM


Tags
vbs spooler restart auto


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:57 PM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2010 EduGeek.net
SERVER: 4
no new posts