code: func (d *DesiredState) CreateNextRun(_ context.Context, taskID platform.ID, now int64) (backend.RunCreation, error) {
  	d.mu.Lock()
  	defer d.mu.Unlock()
  	if !taskID.Valid() {
  		return backend.RunCreation{}, errors.New("invalid task id")
  	}
  	tid := taskID.String()
  
  	meta, ok := d.meta[tid]
  	if !ok {
  		panic(fmt.Sprintf("meta not set for task with ID %s", tid))
  	}
  
  	makeID := func() (platform.ID, error) {
  		d.runIDs[tid]++
  		runID := platform.ID(d.runIDs[tid])
  		return runID, nil
  	}
  
  	rc, err := meta.CreateNextRun(now, makeID)
  	if err != nil {
  		return backend.RunCreation{}, err
  	}
  	d.meta[tid] = meta
  	rc.Created.TaskID = taskID
  	d.created[tid+rc.Created.RunID.String()] = rc.Created
  	return rc, nil
  }
docs: // CreateNextRun creates the next run for the given task.
  // Refer to the documentation for SetTaskPeriod to understand how the times are determined.