Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delay need to spool LP job ?

Status
Not open for further replies.

Exie

Programmer
Sep 3, 2003
156
AU
Hi Folks,

I have a shell script on Solaris 9 like so:
Code:
/usr/sfw/bin/pdf2ps ${OUTPUT} /tmp/${REPORTFILE}-${PROCDATE}.ps

#-- Send postscript file to printer
lp -d $PRINTER /tmp/${REPORTFILE}-${PROCDATE}.ps
lp -d $PRINTER -o itray=tray1 /tmp/${REPORTFILE}-${PROCDATE}.ps
lp -d $PRINTER -o itray=tray3 /tmp/${REPORTFILE}-${PROCDATE}.ps

rm -Rf /tmp/${REPORTFILE}-${PROCDATE}.ps
... the output looks like:
request id is lp_CDESINV3-36059 (1 file(s))
request id is lp_CDESINV3-36060 (1 file(s))
request id is lp_CDESINV3-36061 (1 file(s))

The problem is nothing prints! ... I found if I comment out the rm command, the jobs come out fine.

Is there some sort of lag or delay between the spooler loading up the data into the print request ?

How can I get around this ? I dont want to have sleep timers holding the PID for too long if there is a better solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top