So I have a script that runs and can take 1-8 hours depending on the size of data. The script is run through a Windows 2008 server where the user authenticates through citrix. The citrix server is set to log the user off if idle after 2 hours. If I run a long script lets say when I leave, I lock my machine, and when I get in the next morning machine logged off about 2 hours later killing the script in the process.
Does anyone know any methods in perl to get the current logged in users idle time, then if the idle time is x or greater do something to make the machine not idle? I basically want something that will not affect the user if they are active in the machine working, but if they are idle I want to add code to long running scripts to keep the machine active until the script finishes and is closed.