Calls the appropriate sub based on what was found in the Queue. For an explanation of the subs see this post.
Function RunQueuedJob(Task, Name, Profile)
  Dim Status
   If LCase(Task) = “rundts†Then
       RunDTS Name
   ElseIf LCase(Task) = “runsub†Then
       RunSub Name
   ElseIf LCase(Task) = “runprofile†Then
       Status = RunProfile(Name, Profile)
       If Profile = “Delta Import and Delta Sync†And status = 0 Then
           ClearDeltaTable(MA)
       End If
   End If
End Function