Do not recreate deleted periodic execution async jobs

This commit is contained in:
nathangray 2019-01-28 15:29:25 -07:00
parent 76963cfe2b
commit 03aead70e8

View File

@ -392,12 +392,12 @@ abstract class admin_cmd
} }
} }
// install an async job, if we saved a scheduled job // install an async job, if we saved a scheduled job
if ($this->status == admin_cmd::scheduled) if ($this->status == admin_cmd::scheduled && empty($this->rrule))
{ {
admin_cmd::_set_async_job(); admin_cmd::_set_async_job();
} }
// schedule periodic execution, if we have an rrule // schedule periodic execution, if we have an rrule
elseif (!empty($this->rrule)) elseif (!empty($this->rrule) && $this->status != admin_cmd::deleted)
{ {
$this->set_periodic_job(); $this->set_periodic_job();
} }