code: func newScheduler(db *empire.DB, c *Context) (empire.Scheduler, error) {
  	var (
  		s   empire.Scheduler
  		err error
  	)
  
  	switch c.String(FlagScheduler) {
  	case "cloudformation":
  		s, err = newCloudFormationScheduler(db, c)
  	default:
  		return nil, fmt.Errorf("unknown scheduler: %s", c.String(FlagScheduler))
  	}
  
  	if err != nil {
  		return nil, fmt.Errorf("failed to initialize %s scheduler: %v", c.String(FlagScheduler), err)
  	}
  
  	// If ECS tasks support being attached to with a TTY + stdin, let the
  	// CloudFormation backend run attached processes.
  	if c.Bool(FlagECSAttachedEnabled) {
  		return s, nil
  	}
  
  	d, err := newDockerClient(c)
  	if err != nil {
  		return nil, err
  	}
  
  	a := docker.RunAttachedWithDocker(s, d)
  	a.ShowAttached = c.Bool(FlagXShowAttached)
  	return a, nil
  }
docs: // Scheduler ============================