[Samba] Print Job Notification

Chad Edwards CEdwards at SkyWeb.ca
Sat Jun 22 13:37:02 GMT 2002


Can anyone suggest a way to have a notification after a print job has
completed. I currently have this as my print command:

lpr -r -P%p %s; csh -c 'echo \"%J has started printing on %S\" |
/usr/bin/smbclient -U %L -M %m -I %I' &

It kind of does what I want, but notice that the message says that "Job has
STARTED printing on Printer". This is because with this command the message
is sent after the lpr command is executed and not when the job is actually
done. I would really prefer the message be sent when the job is done, not
when it is starting.

I saw an old message in the archives suggesting a wrapper for the print
command that would keep checking the print queue to see when the job was
done and then send the message. This sounds like it would work, but I don't
have a clue how to write the wrapper to check the queue.

Any help in this matter would be appreciated.

Chad Edwards
Samba Newbie





More information about the samba mailing list