Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
One way to measure how well the workload is distributed among your printers is to track the amount of time documents spend in the print queue. Users can generally expect to receive their printed output within minutes after submitting a print job. If they do not, this could be the result of a single large job monopolizing the printer or of an extremely large print queue.
To help ensure that print jobs are being printed at the expected rate, you can periodically check to see whether any documents have been in the queue longer than a baseline rate established for a particular printer. For example, you might determine that all documents sent to printer A should be printed no later than 15 minutes after they have been submitted. If documents take longer than that to print, then:
To determine the amount of time a print job has been in the print queue, use the IADsPrintJob property TimeSubmitted. This property indicates the time the print job was sent to the printer. You can subtract the submitted time from the current time to determine how long a document has been in the print queue.
Listing 13.9 contains a script that lists print jobs that have spent 15 minutes or more in the print queue. To carry out this task, the script must perform the following steps:
This variable will now contain a collection consisting of all the print jobs in the ArtDepartmentPrinter print queue.
The DateDiff function requires the following three parameters:
Listing 13.9 Monitoring the Time Print Jobs Spend in a Print Queue
|
|
Send us your feedback | « Previous | Next » |