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!
shirleymAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.