[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 435
  • Last Modified:

Print and hold.......

Using the lp command, how do I submit a job to print and have it put on hold immediately (in one command).  eg. lp -dMYPRINTER -(option to hold??) filename

I am unable to set up the process so that the printer is disabled to start with!
0
shirleym
Asked:
shirleym
  • 2
  • 2
1 Solution
 
tfewsterCommented:
It is possible for the administrator to set a fence priority on a printer and then you submit your job with a low priority using -p [or a priority below the fence value, but it then has to be re-prioritised before it will start]

I don't understand what you are trying to achieve - If you want a print job to start later (after everyone has gone home), submit it with "at start_time lp ..."

0
 
shirleymAuthor Commented:
Using the fence priority would work except I would have to change it before and after the job.  (This is a long overnight job that produces about 4,000 pages.)  

I was hoping for an lp command which would submit and hold at the same time.  

This action is controlled from within an application so using "at" is out of the question.  The application only allows for one command.
0
 
tfewsterCommented:
But "at start_time lp [options] filename" IS only one command! Unless you mean that you set up the command as application administrator so you don't actually get to specify a start time - in which case you could fix "start time" to be e.g. 7pm.

An alternative is to "print" to a spool file (called e.g. /tmp/spool/myfile_date_time) which would generate the output, allow you to check it before it started using paper, and then you submit the print job(s) manually at the end of day (possibly using "at" if you don't want to have to hang around until everyone is finished or set up a cron job that prints everything in the /tmp/spool directory).

I've often used this to avoid coming in in the morning to find I've asked for the wrong report etc.
0
 
shirleymAuthor Commented:
I'll change the fence priority (as in my last comment).

I know how to use the "at" command but I am not a Cobol programmer and am unable to make changes to our application.  

The application runs the "lp -d" command to send jobs to the print queue.  I wanted to supply the programmer a command line option to use when calling unix "lp".

Thanks for your help!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now