Notification when a print job is not printed
Anonymous
anonymous at easysw.com
Fri Oct 7 10:15:54 PDT 2005
Create a Bash script that does this.
----------------------------------------------
#!/bin/bash
qcheck_number=`lpq.cups -a | wc -l`
if [ "$qcheck_number" -ge 5 ]
then
lpq.cups -a | mail -s "Printer Issue Detected @ http://servername:631" username at domain.com
else
exit
fi
------------------------------------------------
Run it from crontab like every 5 minutes.
Works good for figuring out if you have a broken queue, the jobs will pile up in the queue and you will get a notification about that.
> This is a multi-part message in MIME format.
> --------------050301030303080807060001
> Content-Type: text/plain; charset=ISO-8859-15; format=flowed
> Content-Transfer-Encoding: quoted-printable
>
> Hi,
>
> is it somehow possible to get a mail or something else, if a
> print job is not printed within a certain time (say 90min).
> We have sometimes trouble with some pdf-files or 1-2 printers.
> In the moment I check it manually.
> Is there a better way to do it ?
>
> --=20
> Bye,
> Peer
> _________________________________________________________
> Max-Planck-Institut fuer Biogeochemie
> Dr. Peer-Joachim Koch
> Hans-Kn=F6ll Str.10 Telefon: ++49 3641 57-6705
> D-07745 Jena Telefax: ++49 3641 57-7864
>
> --------------050301030303080807060001
> Content-Type: text/x-vcard; charset=utf8;
> name="pkoch.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
> filename="pkoch.vcf"
>
> begin:vcard
> fn:Peer-Joachim Koch
> n:Koch;Peer-Joachim
> org;quoted-printable:MPI f=C3=BCr Biogeochemie;DVA
> adr:;;Hans-Knoell-Str. 10;Jena;;07745;Germany
> email;internet:pkoch at bgc-jena.mpg.de
> title:Dr.
> tel;work:+49 3641 576705
> tel;fax:+49 3641 577705
> x-mozilla-html:FALSE
> version:2.1
> end:vcard
>
>
> --------------050301030303080807060001--
>
More information about the cups
mailing list