How to log when you open and close an app to a CSV file
Give a KeyRoutines routine App launched and App quit triggers for the app. Format date writes the time, Started by trigger tells start from stop, and Add text to file appends a line like 2026-11-01 09:02,start to a CSV you can open in Excel.
Steps
- 1
Watch the app
Add App launched and App quit triggers for the app you want to track.
- 2
Get the time
Add Format date with an empty date and the format yyyy-MM-dd HH:mm.
- 3
Start or stop?
Add an If with Started by trigger set to App launched, and Set variable event to start or stop in each branch.
- 4
Write the line
Add Add text to file with your CSV path and the text "date,event", with On new line turned on.
Tips
- The file stays on your PC; KeyRoutines doesn't send it anywhere.
Questions
- Can it work out the hours for me?
- Time between dates can work out the minutes between a remembered start time and now, if you'd rather log durations.
- Does it count time the app sits in the background?
- It logs open and close. Use App focused instead if you want time in front.