Skip to content

Simple python script to track your uptime on your computer and display it as a graph.

License

Notifications You must be signed in to change notification settings

Discusser/uptimeCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

!! Discontinued due to unreliability

If the computer turns off unexpectedly, the shut down will not be detected. I won't update this for now unless someone actually wants to use this.

uptimeCounter

Simple python script to track your uptime on your computer and display it as a graph.

image

Example of graph generated after turning the computer on and off multiple times

How to use (WINDOWS)

Put the three python scripts in a single directory and make sure you have installed matplotlib (to install it, run pip install matplotlib in a terminal) Open Task Scheduler, navigate to Task Scheduler (Local) > Task Scheduler Library, and right click on Task Scheduler Library. Click on Create Task Change the group from your user to SYSTEM

image

Next, go to the Triggers tab, click on New, and choose At startup

image

Now you want to go to the Actions tab, click on New, and fill out the boxes like so:

image

Finally to avoid any issues, uncheck everything in the Conditions tab. Next, do the same thing, but by replacing uptimeCounterStart.bat with uptimeCounterEnd.bat, and changing the trigger to this:

image

The last step is to create your batch scripts that will run your python scripts. uptimeCounterStart.bat should look like this:

D:
cd D:\path\to\dir
py D:\path\to\dir\start.pyw

and uptimeCounterEnd.bat should look like this:

D:
cd D:\path\to\dir
py D:\path\to\dir\end.pyw

Once you've done all that, it should work. To make sure it's working, restart your PC and check for a file called data.txt

About

Simple python script to track your uptime on your computer and display it as a graph.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages