Time is the most precious resource we have. Finding ways to maximize our usage of this resource is important in living a productive and fulfilling life. Combating time squandering activities is a major step in maximizing where one's time is spent and ensures the time we are given is not wasted. Identifying activities that squander time is easy once you take some advice from the experts like Sandra Felton and Marsha Sims. This post will explore how technology is applying these concepts and reclaiming an hour of my weekly time wasting activities.
Just 1 hour? Yes, this is a small battle in a larger war. Equally important as the 178 calorie non nutritional value cupcake is to a dieter looking to maximize an 1800 calorie allotment or a saver decreasing their daily latte budget by $5 to reach a larger goal. To help elaborate these perspectives mathematically that one cupcake is 9% of the daily intake. Make this sacrifice daily during the five day work week and guarantee a quarter pound of weight loss during the work week. Take the latte example and transform this daily habit into $25 per week, $100 per month, $1200 per year or my favorite $559,460.74 after forty years(typical working life) assuming we invested each month in a S&P500 based fund.
Applying these same fundamentals to time transforms non important deceptive and wasteful activities into quality usage of the time we are given. Finding areas to transform a mere 20 minutes in each day will reclaim 4% of the typical work day/week. What if we took this 4% and used it to interface with a customer? Could we expect better relations? Better information? What could be accomplished with an extra 6 hours per month? Better Sales with nearly an entire new work day available? What about in a year? Imagine what could happen if we regained an entire two working weeks in a year by shifting 20 wasted minutes a day into a goal focused activity? If it was two weeks of vacation time, would you squander it?
Looking for areas to improve upon I realized the tool in place that was supposed to help manage this problem was actually creating more problems. This was my epiphany on my mandated time entry. Why are we re-actively logging entries after activities are completed instead of taking a pro-active approach of scheduling activities that are related to a specific goal? What are the financial impacts to myself or the company based on the data entered? Why would a system create distractions from customer facing activities on a daily basis if there isn't any direct financial impact? Better question, why would I continue to allow this nuisance to exist? I didn't. The task was repetitive and the data stagnant. Two prime factors that made this script-able. Enter my assistant.
The first step was creating a data template that would account for seldom changing activities for every day of the week. Taking stock of all possible options a spreadsheet was created to outline possible Customers in column A, Activities in Column B, and each day of the week in row 1.
This simple template enables me to look at an upcoming week and budget my time towards specific goals for each day creating an idealistic schedule to maximize productivity.
Cool. The data template is now set and the real fun can begin. Let's take and example of daily logging of stagnant data like Overhead, Vacation, 8. Which is way boring compared to this:
So, how do we focus on the important things?
Simple thanks to iMacros, JavaScript, and the Linux Cron. The iMacros solution allows for the web automation steps, the JavaScript overcomes some variable/looping shortcomings in the free version of iMacros, and the Cron becomes the dedicated worker bee that never misses an opportunity to log some time.
The data template spreadsheet is exported to a CSV format for import into iMacros. The iMacros macro looks something like this (names of the innocent have been changed)
'identify import file
SET !DATASOURCE TimeEntries.csv
'Identify number of columns
SET !DATASOURCE_COLUMNS 11
''SET !LOOP 2
'Identify input line from import file
SET !DATASOURCE_LINE {{loop}}
SET !VAR1 {{loop}}
ADD !VAR1 -1
'Select Project
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ID:frmGEN ATTR=NAME:ROWVAL.*.LK_SHOW_ProjectID CONTENT={{!COL3}}
'Select category
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ID:frmGEN ATTR=NAME:ROWVAL.*.LK_SHOW_BudgCatID CONTENT={{!COL4}}
'Enter Saturday Hours
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ACTION:somepage.ASP?WCI=eaMain&WCE=tplTableDef&HTML=TSWK1.htm&ObjectType=EATimesheet ATTR=NAME:TSRowList.*.1.Hours_IN CONTENT={{!COL5}}
'Enter Sunday Hours
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ACTION:somepage.ASP?WCI=eaMain&WCE=tplTableDef&HTML=TSWK1.htm&ObjectType=EATimesheet ATTR=NAME:TSRowList.*.2.Hours_IN CONTENT={{!COL6}}
'Enter Monday Hours
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ACTION:somepage.ASP?WCI=eaMain&WCE=tplTableDef&HTML=TSWK1.htm&ObjectType=EATimesheet ATTR=NAME:TSRowList.*.3.Hours_IN CONTENT={{!COL7}}
'Enter Tuesday Hours
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ACTION:somepage.ASP?WCI=eaMain&WCE=tplTableDef&HTML=TSWK1.htm&ObjectType=EATimesheet ATTR=NAME:TSRowList.*.4.Hours_IN CONTENT={{!COL8}}
'Enter Wednesday Hours
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ACTION:somepage.ASP?WCI=eaMain&WCE=tplTableDef&HTML=TSWK1.htm&ObjectType=EATimesheet ATTR=NAME:TSRowList.*.5.Hours_IN CONTENT={{!COL9}}
'Enter Thursday Hours
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ACTION:somepage.ASP?WCI=eaMain&WCE=tplTableDef&HTML=TSWK1.htm&ObjectType=EATimesheet ATTR=NAME:TSRowList.*.6.Hours_IN CONTENT={{!COL10}}
'Enter Friday Hours
TAG POS={{!VAR1}} TYPE=INPUT:TEXT FORM=ACTION:somepage.ASP?WCI=eaMain&WCE=tplTableDef&HTML=TSWK1.htm&ObjectType=EATimesheet ATTR=NAME:TSRowList.*.7.Hours_IN CONTENT={{!COL11}}
This handy li'l bit of code is repeated thanks to a simple JavaScript loop that is executed instead of the orginal iMacro account for the unsupported nested loops. The short story of the JavaScript is set variables based on the number of projects requiring logging, execute login macro, call loop through each project entering time for each customer/activity in the data file, and close Firefox.
var i;
var numProjects = 11;
iimPlay("WebSiteLogin");
for (i = 2; i < numProjects; i++)
{
iimSet("loop", i);
iimPlay("LogTimeEntries");
}
iimPlay("CloseFireFox");
To keep my focus on creating an idealistic schedule of time and not updating a script weekly, I use a BASH script to create the JavaScript file based on the Idealistic Schedule I create each week.
#!/bin/bash
# Define Variable for Output File Location of Javascript
fileLocation="/home/user/iMacros/Macros/LogTime.js"
# Count the number of Projects configured in iMacros Input file
NumOfProj=`wc -l < /home/user/iMacros/Datasources/TimeEntries.csv`
# Add one to the previous output to accomodate loop max value
NumOfProj=$((NumOfProj+1))
# Create Javascript file to to be executed by FireFox for launching Macros to Log Time Entries
echo "var i;" > $fileLocation
echo "var numProjects = "$NumOfProj";" >> $fileLocation
echo "" >> $fileLocation
echo 'iimPlay("WebSiteLogin");' >> $fileLocation
echo "" >> $fileLocation
echo "for (i = 2; i < numProjects; i++)" >> $fileLocation
echo "{" >> $fileLocation
echo 'iimSet("loop", i);' >> $fileLocation
echo 'iimPlay("LogTimeEntries");' >> $fileLocation
echo "}" >> $fileLocation
echo 'iimPlay("CloseFireFox");' >> $fileLocation
And finally, one more BASH script brings it all together to execute flawlessly on a daily basis:
#!/bin/bash
/home/user/directory/CREATETIMELOGSCRIPT &
DISPLAY=:0.0 /usr/bin/firefox imacros://run/?m=LogTimeEntires.js &
Viola! Two weeks of my year returned thanks to creative technologizing.

No comments:
Post a Comment