In an earlier post I showed how to kill idle sessions from C/AL code.  I have been asked to provide a batch that works with Job Queue.

To set this up please add a field to table 91.  Field name is “Kill Idle Duration” and the data type is “Duration”.  In my case this field has the number 50000.  If that number is unavailable just use another number and import the text object and compile.

Attached is the report that can be used in the job queue.  Just make sure that the user running the job queue has enough permissions as shown in my earlier post.

If this is of any value to you please check my copyright page and donate to the web.

Report 89209

7 thoughts on “The Kill Idle batch

  1. Ryan says:

    Hi.

    Will this work with NAV 2009 R2 and above ?

    What about the RTC in 2013 ?

    1. This will work in NAV 2009 R2 and older.
      NAV 2013 uses a single user database connection.
      This will not work in NAV 2013.

      1. Johanna says:

        Dear Gunnar,

        I use NAV 2009 R2. Your method has successfully delete the RTC session, but when the RTC connection is not closed so the user is still continue to work in RTC although the RTC session is deleted. How to close RTC connection too?

        1. Hi Johanna
          I have not tested this and I don’t think there is a way to close the RTC session only. Same goes for NAV 2013 and NAV 2013 R2.

          1. Johanna says:

            Okay Gunnar.. Thank you 🙂

  2. Rizal says:

    and what can we do in NAV 2013?

    1. There is no similar solution for NAV 2013. You can use the session page (as a part of the debugger) to view the active sessions and that is all.

Leave a Reply

%d bloggers like this: