src/bbn/appui/cron.php
public function get_next($id_cron = null): ?array
  {
    if ( $this->check() && ($data = $this->db->get_row("
        SELECT *
        FROM {$this->table}
        WHERE `active` = 1
        AND `next` < NOW()".
        ( bbn\str::is_uid($id_cron) ? " AND `id` = '$id_cron'" : '' )."
        ORDER BY `priority` ASC, `next` ASC
        LIMIT 1")) ){
      // Dans cfg: timeout, et soit: latency, minute, hour, day of month, day of week, date
      $data['cfg'] = json_decode($data['cfg'], 1);
      return $data;
    }
  }
public function get_next($id_cron = null): ?array
  {
    if ( $this->check() && ($data = $this->db->get_row("
        SELECT *
        FROM {$this->table}
        WHERE `active` = 1
        AND `next` < NOW()".
        ( bbn\str::is_uid($id_cron) ? " AND `id` = '$id_cron'" : '' )."
        ORDER BY `priority` ASC, `next` ASC
        LIMIT 1")) ){
      // Dans cfg: timeout, et soit: latency, minute, hour, day of month, day of week, date
      $data['cfg'] = json_decode($data['cfg'], 1);
      return $data;
    }
  }
public function get_next ( $ id_cron = null ) : ? array { if ( $ this -> check ( ) && ( $ data = $ this -> db -> get_row ( "
        SELECT *
        FROM {$this->table}
        WHERE `active` = 1
        AND `next` < NOW()" . ( bbn \ str :: is_uid ( $ id_cron ) ? " AND `id` = '$id_cron'" : '' ) . "
        ORDER BY `priority` ASC, `next` ASC
        LIMIT 1" ) ) ) { // Dans cfg: timeout, et soit: latency, minute, hour, day of month, day of week, date $ data [ 'cfg' ] = json_decode ( $ data [ 'cfg' ] , 1 ) ; return $ data ; } }
Returns the whole row for the next CRON to be executed from now if there is any.
@param null $id_cron
@return null|array
Returns the whole row for the next CRON to be executed from now if there is any .