src/models/Scheduler.php
public function triggerJob()
    {
        try {
            $class = $this->model_class;
            $model = $class::findOne($this->primary_key);

            if ($model) {
                $oldValue = $model->{$this->target_attribute_name};
                $model->{$this->target_attribute_name} = StringHelper::typeCast($this->new_attribute_value);
                $model->save(true, [$this->target_attribute_name]);

                return $this->updateAttributes(['old_attribute_value' => $oldValue, 'is_done' => true]);
            }
        } catch (\Exception $err) {
            $this->delete();
        }
    }
public function triggerJob()
    {
        try {
            $class = $this->model_class;
            $model = $class::findOne($this->primary_key);

            if ($model) {
                $oldValue = $model->{$this->target_attribute_name};
                $model->{$this->target_attribute_name} = StringHelper::typeCast($this->new_attribute_value);
                $model->save(true, [$this->target_attribute_name]);

                return $this->updateAttributes(['old_attribute_value' => $oldValue, 'is_done' => true]);
            }
        } catch (\Exception $err) {
            $this->delete();
        }
    }
public function triggerJob ( ) { try { $ class = $ this -> model_class ; $ model = $ class :: findOne ( $ this -> primary_key ) ; if ( $ model ) { $ oldValue = $ model -> { $ this -> target_attribute_name } ; $ model -> { $ this -> target_attribute_name } = StringHelper :: typeCast ( $ this -> new_attribute_value ) ; $ model -> save ( true , [ $ this -> target_attribute_name ] ) ; return $ this -> updateAttributes ( [ 'old_attribute_value' => $ oldValue , 'is_done' => true ] ) ; } } catch ( \ Exception $ err ) { $ this -> delete ( ) ; } }
Job Trigger.

This method is execute by the queue job.

@return void
Job Trigger .