Operating System - HP-UX
1838389 Members
3153 Online
110125 Solutions
New Discussion

Adding printers without losing current print jobs

 
Douglas Raxworthy
New Member

Adding printers without losing current print jobs

Hi all, we run a system where people are always printing receipts/invoices/customer pickup slips etc. The paper work cannot be printed twice.

I would like to be able to stop the printing system to add a printer, but after perusing man pages, it seems to me there is no way to stop the printing system while guaranteeing that any particular print does not print twice.

From man pages:

disable - By default, any requests that are currently printing on the designated printers are reprinted in their entirety either on the same printer or on another member of the same class.

lpshut - Requests that were printing at the time a printer was shut down are reprinted in their entirety after lpsched is started again.

This 'reprinted in their entirety' is the problem as it may cause two sets to appear if one is being printed when the printer is disabled, and it prints again when the printer is enabled.

Other commands, like lpmove etc need lpsched stopped. lpalt could be used to move requests to a 'pre-disabled' queue, but I think that would still allow a race condition....

Can anyone recommend a way of doing this?

It gets old having to wait until the wee hours of the morning when no printing is happening to hit lpshut....
6 REPLIES 6
Geoff Wild
Honored Contributor

Re: Adding printers without losing current print jobs

How about using reject - that will stop any new jobs, wait until current jobs finish, then lpshut.

Then add/delete printers, lpsched -v, then accept all queues...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
RAC_1
Honored Contributor

Re: Adding printers without losing current print jobs

You can not do that. Instead, do reject for print requests and then stop and add.
There is no substitute to HARDWORK
Douglas Raxworthy
New Member

Re: Adding printers without losing current print jobs

Sorry, since we are printing to these from another app (JD Edwards/Peoplesoft) we cannot reject print jobs, and it would be more trouble to try to ensure that nothing printed out of JDE than it is to wait to start/stop the queues.....
Douglas Raxworthy
New Member

Re: Adding printers without losing current print jobs

I would be nice if the disable command supported the -W flag that allows the current job to complete before disabling.
Mark Nieuwboer
Esteemed Contributor

Re: Adding printers without losing current print jobs

Hi Douglas,

Why do you need to stop the printer for adding a printer.
You can add a printer without stopping the printer spooler. After you add the printer you can enable the printer without losing any current printjobs.

grtz. Mark
Douglas Raxworthy
New Member

Re: Adding printers without losing current print jobs

From the lpadmin man page:

If only the -p and -v options are supplied, lpadmin can be used while the scheduler is running.

Unfortunatly I want to use the '-i' option to define the interface program as well.

Doug