Total time of completed tasks - Looking at how much time I spent working

Hello all! I have searched and couldn’t find what I’m looking for. If there’s a script that already exists or this topic has already been discussed, please let me know!

I’m a freelancer so I try to use Omni Focus to create more structure in my life. I use the estimated time and total time script a lot and I’ve gotten very good at estimating the right amount of time and breaking down tasks that are going to be more than an hour long.
I also export completed tasks of the day and the week along with the use of Vibe to see how much I’m getting done in a period of time.

So now, I’d like to combine these features somehow and see how much time I spend working in a day or week.
I manually do this by going to the completed perspective and then selecting all the tasks of a day and doing the total time script then manually writing them down.

It would be awesome if someone could direct me to a script or create one (ill even pay you!) that can tell me the toal time of complete tasks (perhaps even looking at specfic days in the past?)

Thank you!

Not to suggest that it cannot be done in OF. However what you want could be done better in a dedicated time-tracking app. Have you considered anything along this line?


Maybe this helps. I made a script that displays the total time of today’s completed tasks.


set start_date to (current date)
tell start_date
	set its hours to 0
	set its minutes to 0
	set its seconds to 0
end tell

set finish_date to start_date + (1 * days)
tell application "OmniFocus"
	tell front document
		set est_tasks to estimated minutes of ¬
			every flattened task whose (estimated minutes is not missing value) and (completed is true) and ¬
			((completion date > start_date) and (completion date < finish_date))
	end tell
end tell

set the_sum to 0
repeat with i in est_tasks
	set the_sum to the_sum + i
end repeat

display dialog "You worked today: " & the_sum & " minutes"
1 Like

Hello and thank you for the script. I’m not too familiar with Apple scripts so how would I implement it? I copied and pasted your text into a new apple script but it didn’t work in OmniFocus.

You’re welcome.

You paste the script in the Script Editor and hit Run. If you have any tasks whose completed date is today and estimated time field is not empty, it will sum the estimated time of those tasks and display the total in a dialog.

1 Like

This is fantastic. Thanks!

Now I see, thanks so much!