public function Helpers::cron in Lightning Workflow 8.2
Runs cron by invoking the /cron URL.
@When I run cron over HTTP
File
- modules/
lightning_scheduler/ tests/ contexts/ Helpers.behat.inc, line 21
Class
- Helpers
- Contains miscellaneous helpful step definitions.
Namespace
Acquia\LightningExtension\ContextCode
public function cron() {
$url = Url::fromRoute('system.cron', [
'key' => \Drupal::state()
->get('system.cron_key'),
]);
$url = $url
->toString();
$url = $this
->locatePath($url);
\Drupal::httpClient()
->get($url);
}