Index: /trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs	(revision 1271)
+++ /trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs	(revision 1272)
@@ -59,5 +59,5 @@
     public static string RESPONSE_CLIENT_PERMISSIONOWNER_DOESNT_EXIST = "Client.PermissionOwnerDoesntExist";
 
-    public static string RESPONSE_COMMUNICATOR_HARDBEAT_RECEIVED = "Communicator.HeardbeatReceived";
+    public static string RESPONSE_COMMUNICATOR_HEARTBEAT_RECEIVED = "Communicator.HeardbeatReceived";
     public static string RESPONSE_COMMUNICATOR_JOB_PULLED = "Communicator.JobPulled";
     public static string RESPONSE_COMMUNICATOR_JOBRESULT_RECEIVED = "Communicator.JobResultReceived";
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs	(revision 1271)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs	(revision 1272)
@@ -54,4 +54,5 @@
     ILifecycleManager lifecycleManager;
     IInternalJobManager jobManager;
+    IScheduler scheduler;
 
     /// <summary>
@@ -67,4 +68,5 @@
       jobManager = ServiceLocator.GetJobManager() as 
         IInternalJobManager;
+      scheduler = ServiceLocator.GetScheduler();
 
       lifecycleManager.RegisterHeartbeat( 
@@ -187,7 +189,6 @@
 
       response.Success = true;
-      response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_HARDBEAT_RECEIVED;
-      List<Job> allOfflineJobs = new List<Job>(jobAdapter.GetJobsByState(State.offline));
-      if (allOfflineJobs.Count > 0 && hbData.freeCores > 0) 
+      response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_HEARTBEAT_RECEIVED;
+      if (hbData.freeCores > 0 && scheduler.ExistsJobForClient(hbData))
         response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.FetchJob));
       else
@@ -225,28 +226,15 @@
     public ResponseJob PullJob(Guid clientId) {
       ResponseJob response = new ResponseJob();
-      
-      /// Critical section ///
-      jobLock.WaitOne();
-
-      LinkedList<Job> allOfflineJobs = new LinkedList<Job>(jobAdapter.GetJobsByState(State.offline));
-      if (allOfflineJobs != null && allOfflineJobs.Count > 0) {
-        Job job2Calculate = allOfflineJobs.First.Value;
-        job2Calculate.State = State.calculating;
-        job2Calculate.Client = clientAdapter.GetById(clientId);
-        job2Calculate.Client.State = State.calculating;
-
-        job2Calculate.DateCalculated = DateTime.Now;
+
+      Job job2Calculate = scheduler.GetNextJobForClient(clientId);
+      if (job2Calculate != null) {
         response.Job = job2Calculate;
-        jobAdapter.Update(job2Calculate);
         response.Success = true;
         response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;
       } else {
-        response.Success = true;
+        response.Success = false;
+        response.Job = null;
         response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT;
       }
-
-      jobLock.ReleaseMutex();
-      /// End Critical section ///
-
       return response;
     }
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/HeuristicLab.Hive.Server.Core.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/HeuristicLab.Hive.Server.Core.csproj	(revision 1271)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/HeuristicLab.Hive.Server.Core.csproj	(revision 1272)
@@ -83,4 +83,5 @@
     <Compile Include="InternalInterfaces\DataAccess\IUserGroupAdapter.cs" />
     <Compile Include="InternalInterfaces\IInternalJobManager.cs" />
+    <Compile Include="InternalInterfaces\IScheduler.cs" />
     <Compile Include="JobManager.cs" />
     <Compile Include="LifecycleManager.cs" />
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs	(revision 1271)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs	(revision 1272)
@@ -25,4 +25,5 @@
 using HeuristicLab.Hive.Contracts.Interfaces;
 using HeuristicLab.Hive.Server.Core;
+using HeuristicLab.Hive.Server.Core.InternalInterfaces;
 
 /// <summary>
@@ -61,4 +62,6 @@
   private static IJobResultsAdapter jobResultsAdapter = null;
 
+  private static IScheduler scheduler = null;
+
 
   /// <summary>
@@ -239,3 +242,16 @@
     return jobResultsAdapter;
   }
+
+  /// <summary>
+  /// Gets the scheduler
+  /// </summary>
+  /// <returns></returns>
+  [MethodImpl(MethodImplOptions.Synchronized)]
+  public static IScheduler GetScheduler() {
+    if (scheduler == null) {
+      scheduler = discoveryService.GetInstances<IScheduler>()[0];
+    }
+
+    return scheduler;
+  }
 }
Index: /trunk/sources/HeuristicLab.Hive.Server.Scheduler/HeuristicLab.Hive.Server.Scheduler.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Scheduler/HeuristicLab.Hive.Server.Scheduler.csproj	(revision 1271)
+++ /trunk/sources/HeuristicLab.Hive.Server.Scheduler/HeuristicLab.Hive.Server.Scheduler.csproj	(revision 1272)
@@ -64,4 +64,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="DefaultScheduler.cs" />
     <Compile Include="HiveServerSchedulerPlugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -72,4 +73,12 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Hive.Contracts\HeuristicLab.Hive.Contracts.csproj">
+      <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
+      <Name>HeuristicLab.Hive.Contracts</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Hive.Server.Core\HeuristicLab.Hive.Server.Core.csproj">
+      <Project>{898B31CF-81DC-453B-AEB3-BDF83197A7EE}</Project>
+      <Name>HeuristicLab.Hive.Server.Core</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
