# Batch job when close browser on idle docs

**URL:** <https://forum.collaboraonline.com/t/batch-job-when-close-browser-on-idle-docs/968>\
**Category:** User Support\
**Created:** [March 16, 2022, 8:47pm UTC](https://forum.collaboraonline.com/t/batch-job-when-close-browser-on-idle-docs/968 "2022-03-16T20:47:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmlm](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/jmlm/32/1909_2.png) [@jmlm](https://forum.collaboraonline.com/u/jmlm)\
**Post date:** [March 16, 2022, 8:47pm UTC](https://forum.collaboraonline.com/t/batch-job-when-close-browser-on-idle-docs/968/1 "2022-03-16T20:47:35Z")

</div>

Hi,

When a user close a doc, i have some batch job (copy, generate pdf) for each document.  
But when the doc is idle, I can’t see anything if the user close the browser.  
Is there a way to avoid this ?  
Maybe never idle a doc or may be after a very long time (ie 24 hours) ?  
is it the idle\_timeout\_secs parameter and is there a max value ?

Regards

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [March 17, 2022, 1:37pm UTC](https://forum.collaboraonline.com/t/batch-job-when-close-browser-on-idle-docs/968/2 "2022-03-17T13:37:41Z")

</div>

Hi @jmlm hm maybe also triger the generate pdf when gets to `User_Idle` or `Session_Closed` postMMessage

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [March 17, 2022, 1:40pm UTC](https://forum.collaboraonline.com/t/batch-job-when-close-browser-on-idle-docs/968/3 "2022-03-17T13:40:13Z")

</div>

to change values for idle timeout you ca check the coolwsd.xml

````xml
        <idle_timeout_secs desc="The maximum number of seconds before unloading an idle document. Defaults to 1 hour." type="uint" default="3600">3600</idle_timeout_secs>
        <!-- Idle save and auto save are checked every 30 seconds -->
        <!-- They are disabled when the value is zero or negative. -->
        <idlesave_duration_secs desc="The number of idle seconds after which document, if modified, should be saved. Defaults to 30 seconds." type="int" default="30">30</idlesave_duration_secs>```
````

---

<div class="post-metadata">

**Author:** ![jmlm](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/jmlm/32/1909_2.png) [@jmlm](https://forum.collaboraonline.com/u/jmlm)\
**Post date:** [March 18, 2022, 10:49am UTC](https://forum.collaboraonline.com/t/batch-job-when-close-browser-on-idle-docs/968/4 "2022-03-18T10:49:40Z")

</div>

Thank you @pedro.silva

But is there a max value ?

Do you know how I can get users who are connected (userid or UserFriendlyName), the duration they are idle and if I can “shoot” them but by batch job (not the admin panel).

Regards
