# Number of Clients

**URL:** <https://forum.inductiveautomation.com/t/number-of-clients/3930>\
**Category:** Ignition\
**Created:** [January 30, 2012, 7:31pm UTC](https://forum.inductiveautomation.com/t/number-of-clients/3930 "2012-01-30T19:31:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jcam](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@Jcam](https://forum.inductiveautomation.com/u/Jcam)\
**Post date:** [January 30, 2012, 7:31pm UTC](https://forum.inductiveautomation.com/t/number-of-clients/3930/1 "2012-01-30T19:31:38Z")

</div>

Is there a way to keep a client from launching more than one project at a time? Or set an inactivity timer up to close a project? We have operators that do not log off and end up having several of the same project open on one machine.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [January 30, 2012, 8:27pm UTC](https://forum.inductiveautomation.com/t/number-of-clients/3930/2 "2012-01-30T20:27:42Z")

</div>

Sure, you can add a timer script that checks for inactivity and exits after a certain period of time:`if system.util.getInactivitySeconds() > 300:
    system.util.exit()`

---

<div class="post-metadata">

**Author:** ![Jcam](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@Jcam](https://forum.inductiveautomation.com/u/Jcam)\
**Post date:** [January 30, 2012, 8:34pm UTC](https://forum.inductiveautomation.com/t/number-of-clients/3930/3 "2012-01-30T20:34:12Z")

</div>

Would you put that in Configuration, under Event Scripts (Client)?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [January 30, 2012, 10:57pm UTC](https://forum.inductiveautomation.com/t/number-of-clients/3930/4 "2012-01-30T22:57:36Z")

</div>

Yes, I would create a timer script in the Event Scripts (Client) that checks every minute or so.

---

<div class="post-metadata">

**Author:** ![Jcam](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@Jcam](https://forum.inductiveautomation.com/u/Jcam)\
**Post date:** [January 30, 2012, 11:04pm UTC](https://forum.inductiveautomation.com/t/number-of-clients/3930/5 "2012-01-30T23:04:47Z")

</div>

Thanks Travis.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [January 31, 2012, 7:41pm UTC](https://forum.inductiveautomation.com/t/number-of-clients/3930/6 "2012-01-31T19:41:50Z")

</div>

I would go with Travis' suggestion about an inactivity logoff. It's easy to deal with if it suits your needs.

To answer your first question, it's a little bit hacky, but it would work fine to track open clients in a database table by computer name or IP address, with some sort of "last updated" timestamp. You would then have logon on logoff actions insert and remove records, respectively. A periodic script would update the "last updated" entry for that client or this could be done during window navigation. The idea being that a "stale" record in the database that is too old is disregarded as a client that wasn't properly closed. You could also couple this approach with the inactivity timer that elegantly removes the client's record prior to logging it off.

> [@Jcam](#):
>
> Is there a way to keep a client from launching more than one project at a time? Or set an inactivity timer up to close a project? We have operators that do not log off and end up having several of the same project open on one machine.
