Hello All!
How might one purge the print queue automatically on startup?
Although the reason for the question is BBS-related; I think it's
general enough to ask here... Anyways, for some reason my print
queue sometimes fills up with hundreds, or even thousands of print
jobs. This brings up a popup box which informs me that there is a
problem writing to the printer spool and slows the system to a
c-r-a-w-l until I use PMPATROL to purge the print queue. I usually
must then reboot because although the queue is purged, "something"
is still running somewhere because the CPU remains pegged at 100%
even though not much else is happening. A reboot fixes this. The
cause is unknown and the frequency is about once per month on
average.
In an effort to solve the problem, I tried simulating the problem by
starting a real print job with the printer off. If I go into my
printer's spool directory (in my case C:\SPOOL\OKIDATA1\) I will
find two files for each job. Simply deleting them does not solve
the problem. For one, I can only delete one of each of the two
files (the other is "in use by another process"). But even if I
abort the job by pressing 'abort' in the popup box and then delete
the remaining files in the spool directory, the CPU remains pegged at
100%. If I then reboot, finally everything returns to normal.
The only partial solution I can think of is to use a CMD batch in my
startup folder to check for the prescence of files in the spool
directory, using 'if exist' and 'del'. However, it may not work if
the jobs are already in use by another process, etc. A possibly
better solution would be use the same commands in startup.cmd rather
than commands in a CMD file in the startup folder; as it is my
understanding that startup.cmd will execute before the startup folder
objects are started. Anyways, even if either of them worked, I
would still have to reboot again unless I find out what is still
running that pegs out the CPU even when there is nothing visible in
the spool directory.
Additional info: I am running OS/2 Warp v3.0 w/no fixpaks. I have
remote hardware-based reboot capability. I am using 4OS2 as my OS/2
command interpreter and 4DOS as my DOS box enterpreter. REXX
support is installed.
Is there a solution to my problem? What I am looking for is
something I can throw into my startup folder or startup.cmd which
will purge the print queue and kill and printer/spooler related
processes/threads which might be running.
Regards,
Robin
... A procrastinator's work is never done.
--- FastEcho/2+ 1.45a
---------------
* Origin: The Centre of Robin's Universe * Winnipeg MB (1:348/807)
|