Ruby on Rails
HowToRemoveRubySessFilesOnWindows (Version #2)

Ruby generates the ruby_sess. files to store people’s session information, but doesn’t erase them automatically.

There’s numerous unix scripts out there to erase them, and here’s mine, which erases them all at 2am. If you’ve got a 24×7 application, you’ll probably want something else, but this is fine for me.

Make a batch file (you can’t simply run this command from the command line, it’ll get the temp folder wrong)

schedule_delete.bat:
at 02:00 /every:M,T,W,Th,F,S,Su cmd /c del %temp%\ruby_sess.

And then run the batch file, and it’ll remove them from the system accounts temp folder every morning at 2.
This is assuming that your server is running under the system account.

Ruby generates the ruby_sess. files to store people’s session information, but doesn’t erase them automatically.

There’s numerous unix scripts out there to erase them, and here’s mine, which erases them all at 2am. If you’ve got a 24×7 application, you’ll probably want something else, but this is fine for me.

Make a batch file (you can’t simply run this command from the command line, it’ll get the temp folder wrong)

schedule_delete.bat:
at 02:00 /every:M,T,W,Th,F,S,Su cmd /c del %temp%\ruby_sess.

And then run the batch file, and it’ll remove them from the system accounts temp folder every morning at 2.
This is assuming that your server is running under the system account.