How to log app run time Long story short, I need to log these things some apps: The starting time of the app, total running time and the end time of the app.

Edit: I would want to run this a whole week, to see how much time these apps are using
.
Here is a workaround you could use.

Objective: Create a Task make an application runtime log. 

Profile

Application >> Select target application e.g Facebook app (Tap back to exit out of this profile.

Long press the first context and select Add >> Day >> Select number of days e.g 7 days

Tasks

Task 1 (entrance) You can name it Facebook login time or anything.


A1 Variables>> Variable Set [Name: %Logintime to %DATE %TIME (leave everythin as is)]


Tap back to perform second action.


File >> Write File >> [File (give any name e.g sd_card/Facebook logtime.csv) Text (Start, %Logintime) Tick Append, Tick Add New line]

Save and exit this Task


Create another task

Task 2 (exit) You can name it Facebook logout time or anything.


A1 Variables>> Variable Set [Name: %Logouttime to %DATE %TIME (leave everythin as is)]


Tap back to perform second action.


File >> Write File >> [File (give any name e.g sd_card/Facebook logtime.csv) Text (Start, %Logouttime) Tick Append, Tick Add New line]


Save and exit this Task

Explanation: When the Facebook application is opened, the log file (that .csv file you created) is written the start time, and when you exit it writes again the end time, such that after a week it shows time you used the facebook app, hence you can calculate the time.

Please note, to perform calculations within tasker is possible but is advanced so I just did it the simple way.

Happy logging!