code: public function copyJob(JobInterface $from, \Abc\Bundle\JobBundle\Model\JobInterface $to)
      {
          $to->setType($from->getType());
          $to->setResponse($from->getResponse());
          $to->setParameters($from->getParameters());
  
          if (null != $from->getStatus()) {
              $to->setStatus($from->getStatus());
          }
  
          foreach ($from->getSchedules() as $schedule) {
              $to->addSchedule($schedule);
          }
  
          return $to;
      }
docs: Copies properties of a job to another job
  
  @param JobInterface                             $from The job where properties are copied from
  @param \Abc\Bundle\JobBundle\Model\JobInterface $to   The job where where properties are copied to
  @return \Abc\Bundle\JobBundle\Model\JobInterface The copied job