1

A Google search revealed some good answers but they don't exactly solve my problem.

For running a python script after logging out from SSH the answer is: https://stackoverflow.com/questions/2975624/how-to-run-a-python-script-in-the-background-even-after-i-logout-ssh

To run python in the background in Windows, the answer is: https://stackoverflow.com/questions/783531/how-to-run-a-python-script-in-the-background

However, what I want to do, for example, is to print the name of the user currently logged into the computer. The way I imagine solving the problem is to log in as an admin (I have root access), run a suitable python script which regularly updates an html file on a server, and then access the html file whenever I want after logging out from the computer as an admin.

Update 1: The system has Windows XP. So I can't use scheduled tasks to run the script every few minutes.

Shashank Sawant
  • 1,111
  • 5
  • 22
  • 40
  • What's wrong with the answers on the page you linked to (Scheduled Tasks, run it as a service, etc.)? – abarnert Jan 19 '14 at 23:14
  • The system has Windows Xp. 'Daily' is the highest frequency I think I can run it at. – Shashank Sawant Jan 19 '14 at 23:39
  • First, who cares if you can only run it daily, if you're planning to have it keep running anyway? And second, what about running it as a service, or the other answers there? – abarnert Jan 19 '14 at 23:42
  • So why don't you start the script when the computer starts and just have the script check every few minutes? I think this is more of a windows question and not really related to python. – Jason Lv Jan 20 '14 at 00:14

0 Answers0