Urgent & Important: Do Both

WhatsApp Image 2018-12-17 at 11.10.40 AM

 

While you are working on an important work, out of the blue an urgent situation arrives that demands your immediate attention. Urgent or Immediate is a dilemma we all face in our everyday lives, triaging them is what we need skill. Let’s look holistically at the two situations below to create an order of precedence to complete them.

Situation 1: You were working on some important long-term strategy that requires you to define the right processes, people, technologies, tools, and products. While doing that you are getting urgent requests from your clients, teams – internal and external. You must address those requests first. However, to grow business in a robust manner you must not ignore the important initiatives. Prioritize urgent and important work, but do both.

Situation 2: You committed yourself for a 30 min daily workout routine. It is highly important for you to keep up with good health. You were highly motivated. You successfully accomplished the routine on day 1. On day 2, an urgent situation interrupts your workout, which is not quite a routine yet. You had no choice but to address that urgent issue. You could not finish your workout. Sad. The same thing happened on day 3. And now, everyday something urgent comes up. Ultimately, you have made a habit to ignore the important thing. Not good. You need to prioritize but do both.

We do not have control over urgent situations. We have to deal with them. But what we have control over is ‘important things’. Some adjustments and prioritization are needed. But Ignoring important things must not be our choice.

Below are some more examples that will help understand better what activity falls under urgent and important categories and what to do with them:

Urgent:

  1. Crises
  2. Project deadlines
  3. Crying child

Address them immediately!

Important:

  1. Self-care- exercise, meditation and so on
  2. Family and friends
  3. Long-term projects
  4. Financial planning
  5. Recreation and fun

Make sure you address them after addressing urgent issues.

Not Urgent and Not Important

  1. Most TV shows
  2. Social networking
  3. Time Wasters
  4. Daydreaming

It’s your life. You know what to do with it.

Advertisements

IScheduler Resolve Issue with Quartz.Net & Unity

Today I was creating a job scheduler using Windows service, Quartz.Net and Unity. It is a killer combination and provides graceful application setup for job scheduler. Not to mention, it works like a charm. But, unfortunately I came across a painful issue while resolving Quartz’s IScheduler interface. For several hours, I looked all over the internet for the solution but I couldn’t find any solution. Hence, I am writing this post.

Just to give you a quick background of application environment, I was using following framework and packages in my service. I installed them from Nuget Packge Manager.

  1. .NET Framework 4.5.2
  2. Quartz.Net 2.3.3
  3. Quartz.Unity 1.4.2
  4. Unity 4.0.1

In order for dependency injection to work in the scheduler applications built with Quartz, you have to resolve IScheduler using Unity. You can not directly instantiate StdSchedulerFactory() and GetScheduler (see here for normal set up). I wouldn’t go into much details about what each line of code does but below is the code snippet one should write.

Container.AddNewExtension<QuartzUnityExtension>();

var scheduler = Container.Resolve<IScheduler>();

scheduler.Start();

At the line #2 program fails. Briefly, it says:

Resolution of the dependency failed, type = “Quartz.ISchedulerFactory”, name = “”(none)”.

The issue looks like the picture below:

Exception

 

Why this issue, what I did wrong and how to resolve this?

I looked through what AddNewExtension is doing. Tried to manually register Scheduler Factory. Tried many things. Then, I looked through each and every package description, their versions & dependencies on Nuget website. And then when I looked at different versions available for dependent assemblies. Finally, I found the culprit assemblies:

  1. Common.Logging
  2. Common.Logging.Core

I found that the version I had in references was 3.0.0 for both the assemblies. I updated these assemblies with the latest version (3.3.1). Bingo! the application worked.

So what happened? The latest package of Quartz.Net is compiled with old version (3.0.0) of Common.Logging and Common.Logging.Core. When I installed Quartz.Net the old version of these assemblies ended up in my references.

Unfortunately, the exception didn’t mention anything about Common.Logging. One can argue that using another DI framework like Castle Windsor or drop Quartz from solution could be easier. But you never know when all of the sudden you would encounter such unrelated problem.

Yet another day. Hope this post will help.