Operating System - Linux
1748106 Members
4852 Online
108758 Solutions
New Discussion юеВ

Can we set priority for linux spool

 
tom quach_1
Super Advisor

Can we set priority for linux spool

Dear,

in HPUX i can set priority for printer spool using comand "lpfence" from 1 to 7 so i can keep jobs in the spools until i want to print it out.
just moved to OUL5x64 (RedHat 5x64)and could not find any command similar to "lpfence"
If anyone known of this issue please advise.
Regards,
Tom
2 REPLIES 2
Matti_Kurkela
Honored Contributor

Re: Can we set priority for linux spool

In Linux (assuming the CUPS printing system, which is the default option but not the only possibility) the "lp" command has a priority option. However, the priority only determines the order in which the jobs are printed: if the queue is enabled, it will eventually print all jobs in the queue.

If you want to hold all jobs in the queue, use the "disable" (or "cupsdisable" in some distributions) command to stop the output side of the queue. Use the "enable" command (or "cupsenable") to allow the jobs to print again.

Note that there is another pair of commands to control the input side of the queues: "accept" and "reject".

Both the "reject" and "disable" commands allow you to specify a reason why the queue has been stopped. This reason will be displayed to the users when they examine the queue status.

The possible states are:

- accept and enable: normal state, jobs are accepted and printed.
- accept and disable: jobs are accepted in the queue and held there.
- reject and enable: no new jobs are accepted, but jobs already in the queue are printed out.
- reject and disable: the print queue is totally disabled.

If you wish to hold only some jobs for a particuolar printer while allowing the rest to print, you will have to set up two printer queues for that printer: one for the immediate jobs and another for delayed ones. When it's time to print the delayed jobs, just set the real-time queue to reject and/or disable and then enable the delayed queue.

MK
MK
tom quach_1
Super Advisor

Re: Can we set priority for linux spool

Thanks MK,

Wow...So the HPUX still much better than the Linux in this regard.
Regards,
Tom