public function getScheduledJobs()
    {
        $jobs = [];
        foreach ($this->jobs as $job) {
            $model = CronJob::find($job['id']);

            // create a new model if this is the job's first run
            if (!$model) {
                $model = new CronJob();
                $model->id = $job['id'];
                $model->save();
            }

            // check if scheduled to run
            $params = new DateParameters($job);
            $date = new CronDate($params, $model->last_ran);

            if ($date->getNextRun() > time()) {
                continue;
            }

            $job = array_replace([
                'successUrl' => '',
                'expires' => 0,
            ], $job);

            $job['model'] = $model;
            $jobs[] = $job;
        }

        return $jobs;
    }