[K12OSN] Re: cups stopping printer

Scott Sherrill scott at remc1.org
Wed Jan 11 12:53:27 UTC 2006


Peter Hartmann wrote:

>Is there anything wrong with putting this in the crontab?  :
>
>
>0-59/10  * * * * /usr/bin/enable [printer1] [printer2] .....
>
>  
>

Peter -

Here's what we do, but we only run it once/hour:

#!/usr/bin/perl
open (PRINTERS, "cat /etc/printcap | grep -v \"#\" | cut -d\"|\" -f1 |");
while(<PRINTERS>)
        { chop;
        system "/usr/bin/enable $_ > /dev/null"; }


We don't have to change the crontab entry that way -- it always looks at 
all printers and enables them.

Scott




More information about the K12OSN mailing list