This application tracks battery health and logs the data. Follow these steps to build the project and set up the scheduled task in Task Scheduler.
Important
This is a windows only project!
Note
This project is a work in progress and is not yet complete. The instructions provided are for building the project and setting up the scheduled task in Task Scheduler.
Follow these steps to manually download and set up the Battery Health Tracker task in Task Scheduler with the specified settings.
- Download the executable from the releases page
- Extract the contents of the zip file to a directory of your choice.
- Note the path to the executable, e.g.,
C:\Users\user\AppData\Local\Battery Life Tracker\battery-health-tracker.exe
. - Note the path to the working directory, e.g.,
C:\Users\user\AppData\Local\Battery Life Tracker
. - Proceed to the Step-by-Step Instructions to set up the scheduled task in Task Scheduler.
-
Press
Win + R
, typetaskschd.msc
, and pressEnter
. -
In the right-hand Actions pane, click on
Create Task...
. -
General Tab:
- Name: Enter
Battery Health Tracker
. - Description: (Optional) Enter a description for the task.
- Security options:
- Select
Run whether user is logged on or not
. - Check
Run with highest privileges
.
- Select
- Configure for: Select
Windows 10
.
- Name: Enter
-
Triggers Tab:
- Click
New...
to create a new trigger. - Begin the task: Select
On a schedule
. - Settings: Select
Daily
. - Start: Set the start date and time (e.g.,
10:30 AM
). - Advanced settings:
- Check
Repeat task every
and set it to30 minutes
. - Set
for a duration of
to1 hour
. - Ensure
Enabled
is checked.
- Check
- Click
OK
.
- Click
-
Actions Tab:
- Click
New...
to create a new action. - Action: Select
Start a program
. - Program/script: Enter the path to your executable, e.g.,
C:\Users\user\AppData\Local\Battery Life Tracker\battery-health-tracker.exe
. - Start in (optional): Enter the working directory, e.g.,
C:\Users\user\AppData\Local\Battery Life Tracker
. - Click
OK
.
- Click
-
Conditions Tab:
- Uncheck
Start the task only if the computer is on AC power
. - Ensure other options are set as needed.
- Uncheck
-
Settings Tab:
- Check
Allow task to be run on demand
. - Check
Run task as soon as possible after a scheduled start is missed
. - Check
If the task fails, restart every
and set it to30 minutes
. - Set
Attempt to restart up to
to3 times
. - Check
Stop the task if it runs longer than
and set it to1 hour
. - Ensure other options are set as needed.
- Check
-
Click
OK
to create the task (If prompted, enter your user credentials to save the task.)
-
Clone the Repository:
- Open a terminal and clone the repository:
git clone https://github.com/yourusername/battery-health-tracker.git cd battery-health-tracker
- Open a terminal and clone the repository:
-
Install Rust:
- If you don't have Rust installed, you can install it from rust-lang.org:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- If you don't have Rust installed, you can install it from rust-lang.org:
-
Build the Project:
- Build the project in release mode:
cargo build --release
- Build the project in release mode:
-
Locate the Executable:
- After building, the executable will be located in the
target/release
directory:target/release/battery-health-tracker.exe
- After building, the executable will be located in the