   lockDurationMs = 2 * 60 * 1000 
   lockManager.setLock mailTaskName, lockDurationMs, (err) ->
     if err? then return log.error "Error getting a distributed lock for task #{mailTaskName}!"
-    emailInternalCandidateUpdateReminder.apply {"mailTaskName":mailTaskName}, (err) ->
+    emailInternalCandidateUpdateReminder.call {"mailTaskName":mailTaskName}, (err) ->
       if err
         log.error "There was an error sending the internal candidate update reminder.: #{err}"
       else

  
candidateFilter = (candidate, sentEmailFilterCallback) ->
  if candidate.emails?.anyNotes?.enabled is false or candidate.emails?.recruitNotes?.enabled is false
    log.info "Candidate #{candidate.jobProfile.name} opted out of emails, not sending to them."
    return sentEmailFilterCallback true
  findParameters =
    "user": candidate._id

  findParameters = 
    "jobProfile.updated":
      $lte: @currentTime.toISOString()
      $gt: @beginningOfUTCDay.toISOString()
    "jobProfileApproved": false 
  User.find(findParameters).select("_id jobProfile.name jobProfile.updated").lean().exec cb
  
