diff --git a/CHANGELOG.md b/CHANGELOG.md index 141f973..a94b102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ 1. [](#bugfix) * Fixed non-routable and non-published pages showing up in search results * Fixed indexing in multi-language sites + * Use CLI command directly in scheduler command to work [#95](https://github.com/trilbymedia/grav-plugin-tntsearch/issues/95) # v3.1.1 ## 02/12/2020 diff --git a/tntsearch.php b/tntsearch.php index 70a22da..252a98a 100644 --- a/tntsearch.php +++ b/tntsearch.php @@ -110,7 +110,7 @@ public function onSchedulerInitialized(Event $e): void $scheduler = $e['scheduler']; $at = $this->config->get('plugins.tntsearch.scheduled_index.at'); $logs = $this->config->get('plugins.tntsearch.scheduled_index.logs'); - $job = $scheduler->addFunction('Grav\Plugin\TNTSearchPlugin::indexJob', [], 'tntsearch-index'); + $job = $scheduler->addCommand('bin/plugin tntsearch index', [], 'tntsearch-index'); $job->at($at); $job->output($logs); $job->backlink('/plugins/tntsearch');