Skip to content

Commit

Permalink
Use CLI command via scheduler #95
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Miller <rhuk@mac.com>
  • Loading branch information
rhukster committed Jun 8, 2020
1 parent 24fabe0 commit f46d722
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tntsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit f46d722

Please sign in to comment.