Task Tracker v4.0


TaskTracker is a simple application that can be used to help store and report the hours that you spend on various tasks throughout the day. I wrote it when I started freelancing as I needed to track my hours carefully for invoicing. Even when I returned to permanent employment for a few years I continued to use it as I found it useful to know how much time was spent on development, support, documentation etc.

The application revolves around the notion of a session, which is the time spent on a single task. You begin a session when you "Clock In" and end a session when you "Clock Out". There is no limit to the number of sessions you can create throughout the day, and a session can span multiple days. As well as associating a short name for the tasks, you can also specify the name of the location, which is useful if you work at multiple sites.

At some point you will want to know how your time has been spent, and to achieve this you can create a report. Most reports are focused around common periods such as a week or month to aid filling in timesheets or invoices. There is also a Task centric report for tracking overall time on each task.

My use has varied over the years, mostly depending on the level of reporting requested by my clients. In some cases I have only been required to submit a simple timesheet on a monthly basis with the number of hours per day. Other times I have been required to present a weekly timesheet, with a breakdown of how much time has been spent on individual tasks.

The Main View & Menu

The main view of TaskTracker has 3 panels. The top one shows the current date & time, the bottom left shows the details of the current session, and the right one is a quick summary of the hours to date over the common reporting periods. The toolbar contains buttons to access the most common features and is grouped according to the menu structure - File, Session, Report and Help.

The following table shows the menu tree and provides links to the relevant sections.

File Session Report Prune Tools Help
Export Clock In Window Sessions Options Contents
Import Switch Tasks Clipboard Tasks About
Exit Clock Out Print Locations
Edit File
Clocking In & Out

The main metaphor (hopefully obvious from the icon) used in TaskTracker is that of punching (or clocking) in and out at the ends of a shift. You may in fact work exactly in this way, but it also caters for people who either wish to classify their tasks in finer detail, work on very short tasks, or spend their day switching between different tasks. There is no limit to the number of sessions that can be associated with a day.

To clock in and out you use the "Session | Clock In..." and "Session | Clock Out..." menu commands, or use the toolbar buttons, or the shortcut keys Ctrl+I and Ctrl+O. These will present you with a dialog into which you can enter the details of the session. A session consists of a start and end date and time, a name for the task and a name for the location where it was performed. The dialog defaults to using the current date & time, and previously entered task name and location. If required you can clock in or out either in the past (if you forgot) or in the future. TaskTracker also maintains a list of all the task and location names you enter so you can save typing by picking a previous one using the combo boxes.

If you find yourself switching tasks quite frequently you can save time by using the "Session | Switch Tasks..." command (Ctrl+S) which only requires you to enter the task completed and the task about to be started and assumes that the dates and times should be adjacent.

You may find that over time you are either not around to enter your task details, or are that you need to adjust the timings, names or locations of some sessions. This can be done with the "Sessions | Edit..." command (Ctrl+E). This displays a dialog with all the sessions entered (except for the current one) ordered by the start date.

Through this dialog you can add, edit and remove whole sessions. There is also a button to allow you to rename a task (this changes the name of the task on all sessions that match).

As you can probably see from the screen shots, task names are only expected to be very short. They are only meant to be a quick reminder, so for example I would use task names like "TaskTracker Helptext" or "Bug #12345" rather than enter a longer description because that tends to go into other documentation. However if that is a feature that would be useful to many others then I will certainly consider putting it in.

There is nothing to stop you creating empty sessions, i.e. a session that begins and ends at the same point in time. This can be useful for adding sessions that you do not want to contribute towards the time worked, such as a holiday. A holiday doesn't count towards my hours worked, but I still want to have an entry on that day so that it's accounted for. It also means I can easily see how many days holiday I have taken.

Generating a Report

At some point you are probably going to want to generate a summary of the hours that you have spent, either during the week, or on some tasks. Task Tracker allows you to create a few simple reports based either around a period in time or the tasks you have entered, and you can display this on screen (Ctrl+W), print it (Ctrl+P) or send it to the clipboard (Ctrl+C) or a file (Ctrl+F) using the various report commands under the "Report" sub menu.

All the dialogs for creating a report have the same basic layout. There are a number of options specific to the destination (e.g. filename or printer) and then some common "Parameters" that define the data that will be included.

The first of these is the Grouping. This defines how the session data will be aggregated. If you are completing a timesheet you would probably use the By week or By month option as you would want to group the sessions into weeks or months, with an appropriate total. You may be required to list what tasks you have been doing and how long you spent on each one, in which case the By task report will sum according to each task name.

The grouping just defines the overall shape of the report, whereas the Period narrows the range of dates down to just the set you are interested in; with some pre-defined options already available, such as This Week and Last Month.

Under the period, there are a few additional options that allow you to control how much detail is generated. If you need the finest level of detail, check Report session details as this will produce one line per session with the start and end dates & times and both the task name and location included. By default the report will not include days (or tasks) for which there is no entry, e.g. Saturdays and Sundays, by you can force them to be included by checking Report empty groups. Finally, if you are generating a report that covers more than one grouping and you need a final total then tick the Report overall total box.

There is one additional setting at the bottom left which is ticked by default as it assumes that these are the default settings. This is probably what you want most of the time, but occasionally you may want to generate an ad-hoc report and don't want any defaults changed, in which case you should untick it.

Importing & Exporting Data

The data is stored in a custom format binary file. However you can still export data (either as a means of backing it up or because you want to use the data externally in a tool like Excel) by using the "File | Export..." command (Ctrl+X). Just enter the filename and select the date range (which defaults to the entire database) and it will produce a CSV (Comma Separated Values) format file, with 4 fields per row - the start and end dates & times (in ISO format), the task name and the location name.

Alternatively you may wish to import data from another source (or restore data from a backup). This is done by using the "File | Import..." command (Ctrl+M). You specify the name of a CSV file, in the same format as TaskTracker exports, and choose whether you want to replace the entire database with what you are importing (e.g. a full restore) or merge the data into the database - with the ability to include or discard duplicate sessions.

Pruning Data

TaskTracker keeps track of the name of every task and location that you use. This can mean that the task and location combo boxes eventually become heavily populated. You are also responsible for deleting sessions that you are no longer interested in. The "Prune" menu contains commands to allow you to trim the excess data.

The first is "Prune | Sessions..." which is a faster way to remove multiple contiguous sessions than selecting them one-by-one in the "Edit | Sessions..." dialog and pressing Delete. You can either delete the entire database, or remove a subset by specifying a date range.

The other two pruning commands "Prune | Tasks..." and "Prune | Locations" both behave the same way. They present you with a list of items that are no longer used (i.e. there are no sessions that have that task name or location), you can select one or more items and press OK to delete them.

Application Settings

There are a number of configuration settings for TaskTracker that can be changed through the "Tools | Options..." dialog.

The first setting "Minimise to system tray" changes TaskTracker so that it does not appear in the taskbar when minimised. It instead appears in the system tray area and provides a menu (via a right-click) for clocking in & out etc. I find this less intrusive that starting and stopping TaskTracker each time I switch tasks.

The "Warn if sessions overlap" checkbox controls whether TaskTracker will warn you (with a message box) if you try and enter a session that overlaps another. This can happen quite easily if you are manually adjusting sessions in the "Edit" dialog.

The "Session length format" setting determines how the length of sessions is displayed, both on screen and in a report. By default it's set to "Hours & Minutes", so an hour and a half would appear "1 h 30 m". Alternatively you can select "Hours Only" which displays them as a decimal, e.g. "1.5 h"

The final setting is used to describe the preferred order of the week. Some clients treat a working week from Monday to Sunday and others from Saturday to Friday. Changing this allows me to align my report with their practice.

License & Warranty

This application is freeware - you get what you pay for, nothing more, nothing less.

Source Code

The full source code (C++) is available from my web site listed below.


Rusty Biggs for testing it in a non GMT time zone.

Contact Details

The "Help | About" dialog also contains my contact details. Please check the web site for updates.

Email: gort@cix.co.uk
Web: www.cix.co.uk/~gort

Chris Oldwood
26th March 2007