[cups.general] Running external command before every job

Jerome Alet alet at librelogiciel.com
Mon May 30 11:56:01 PDT 2005


On Mon, May 30, 2005 at 02:32:41PM -0400, Matthias Nagel wrote:
> I want CUPS to run a certain (external) program every time a job 
> is started or has finished. Is their any configuration directive 
> that I can use for this? 

There's no way to do this reliably and independantly of the printer 
driver used with CUPS for now. 

You either have to write your own backend wrapper to do this, or use 
a generic backend wrapper which will handle all the interaction with 
CUPS while letting you plug your own scripts before, after, or 
during the sending of the job's datas to the real backend (printer 
port). A plug and play backend wrapper which does what you need and 
more can be found here : 

  http://www.librelogiciel.com/software/Tea4CUPS/action_Presentation
  
With this tool, your scripts don't need any special knowledge about  
CUPS, and can extract all the job information from environment variables.

hth  

Jerome Alet





More information about the cups mailing list