scheduler->template)) { $this->{$this->scheduler->template}(); } } private function email_record() { (new EmailRecord($this->scheduler))->run(); } private function email_statement() { (new EmailStatementService($this->scheduler))->run(); } private function email_report() { match($this->scheduler->template){ 'product_sales_report' => (new EmailReport($this->scheduler))->run(), default => null }; } /** * Sets the next run date of the scheduled task * */ //handle when the scheduler has been paused. }