Thx Bertrand.

Cheers,
JC

On 9/9/11 12:04 PM, Bertrand Delacretaz wrote:
Hi JC,

On Tue, Sep 6, 2011 at 5:41 PM, Jean-Christophe Kautzmann
<[email protected]>  wrote:
...I'm triggering a servlet as a background service by adding the parameter
sling:bg=true to the request.
The job stream is available below /var/bg/jobs (e.g.
/var/bg/jobs/2011/06/29/11/37/2/stream).
How can I retrieve this path programmatically?
You can use the Location header of the 302 that you get when you do that:

$ curl -D - 
"http://admin:admin@localhost:8080/system/bgservlets/test?sling:bg=true";
HTTP/1.1 302 Found
Location: http://localhost:8080/var/bg/jobs/2011/09/09/12/02/1
Content-Length: 0

-Bertrand

Reply via email to