summaryrefslogtreecommitdiffstats
path: root/core/modules/system/src/CronController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/system/src/CronController.php')
-rw-r--r--core/modules/system/src/CronController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/system/src/CronController.php b/core/modules/system/src/CronController.php
index ec11569..915a0c8 100644
--- a/core/modules/system/src/CronController.php
+++ b/core/modules/system/src/CronController.php
@@ -58,10 +58,10 @@ class CronController extends ControllerBase {
*/
public function runManually() {
if ($this->cron->run()) {
- drupal_set_message($this->t('Cron ran successfully.'));
+ $this->messenger()->addStatus($this->t('Cron ran successfully.'));
}
else {
- drupal_set_message($this->t('Cron run failed.'), 'error');
+ $this->messenger()->addError($this->t('Cron run failed.'));
}
return $this->redirect('system.status');