public function actionSchedulerAdd()
    {
        $model = new Scheduler();
        $model->attributes = Yii::$app->request->bodyParams;

        if (!$model->hasTriggerPermission($model->model_class)) {
            throw new ForbiddenHttpException("Unable to schedule a task for the given model.");
        }

        if ($model->save()) {
            $model->pushQueue();

            // if its a "now" job, run the internal worker now so the log table is refreshed immediately
            Yii::$app->adminqueue->run(false);
            Config::set(Config::CONFIG_QUEUE_TIMESTAMP, time());
            return $model;
        }

        return $this->sendModelError($model);
    }