Skip to content

Commit

Permalink
Set schedule to false for single events.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Oct 24, 2018
1 parent f066d73 commit ced64a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/class-job.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ protected static function to_instance( $row ) {
$job->interval = $row->interval;
$job->status = $row->status;

if ( ! empty( $row->schedule ) ) {
if ( ! $row->interval ) {
// One off event.
$job->schedule = false;
} elseif ( ! empty( $row->schedule ) ) {
$job->schedule = $row->schedule;
} else {
$job->schedule = get_schedule_by_interval( $row->interval );
Expand Down

0 comments on commit ced64a3

Please sign in to comment.