Asheeown Posted October 10, 2008 Author Share Posted October 10, 2008 Alright, that's it, finally after all this time I have figured it out. Can't say much for the help but I can say thanks for the attempts for the people who did try like Dark, or Xan. If anyone would like to know, the thing I was trying to accomplish was kill a background process if a user was inactive for a certain amount of time. I thought the only way possible was to log the process ID when the script was executed and have a cron job kill it if the user was inactive. I have now thought on the script side. Now at the top of the script when it refreshes which is every 30 seconds in the background it will check if the user is inactive and if so it will run a die() command. So simple yet for almost a month I couldn't figure it out...solved. Link to comment https://forums.phpfreaks.com/topic/123695-solved-process-id/page/2/#findComment-661519 Share on other sites More sharing options...
DarkWater Posted October 10, 2008 Share Posted October 10, 2008 Heh, glad you finally figured it out. Link to comment https://forums.phpfreaks.com/topic/123695-solved-process-id/page/2/#findComment-661530 Share on other sites More sharing options...
qwerty Posted September 11, 2012 Share Posted September 11, 2012 Just a working example of WScript.Shell usage: $wscript = new COM('WScript.Shell'); $Command = $wscript->Exec("ls"); $PID = $Command->ProcessID; echo $PID."\n"; Link to comment https://forums.phpfreaks.com/topic/123695-solved-process-id/page/2/#findComment-1376983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.