code: func (e *engineImpl) execTimerTask(c context.Context, tqTask proto.Message) error {
  	msg := tqTask.(*internal.TimerTask)
  	timer := msg.Timer
  	action := fmt.Sprintf("timer %q (%s)", timer.Title, timer.Id)
  
  	return e.withController(c, msg.JobId, msg.InvId, action, func(c context.Context, ctl *taskController) error {
  		// Pop the timer from the pending set, if it is still there. Return a fatal
  		// error if it isn't to stop this task from being redelivered.
  		switch consumed, err := ctl.consumeTimer(timer.Id); {
  		case err != nil:
  			return err
  		case !consumed:
  			return fmt.Errorf("no such timer: %s", timer.Id)
  		}
  
  		// Let the task manager handle the timer. It may add new timers.
  		ctl.DebugLog("Handling timer %q (%s)", timer.Title, timer.Id)
  		err := ctl.manager.HandleTimer(c, ctl, timer.Title, timer.Payload)
  		switch {
  		case err == nil:
  			return nil // success! save the invocation
  		case transient.Tag.In(err):
  			return err // ask for redelivery on transient errors, don't touch the invocation
  		}
  
  		// On fatal errors, move the invocation to failed state (if not already).
  		if ctl.State().Status != task.StatusFailed {
  			ctl.DebugLog("Fatal error when handling timer, aborting invocation - %s", err)
  			ctl.State().Status = task.StatusFailed
  		}
  
  		// Need to save the invocation, even on fatal errors (to indicate that the
  		// timer has been consumed). So return nil.
  		return nil
  	})
  }
docs: // execTimerTask corresponds to a tick of a timer added via AddTimer.