diff --git a/src/Form/SchedulerCronForm.php b/src/Form/SchedulerCronForm.php
index 398f2f4..b196c16 100644
--- a/src/Form/SchedulerCronForm.php
+++ b/src/Form/SchedulerCronForm.php
@@ -7,10 +7,12 @@
 
 namespace Drupal\scheduler\Form;
 
+use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Render\Element;
 use Drupal\Core\Url;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
 
 /**
@@ -19,6 +21,30 @@ use Symfony\Component\Routing\Exception\RouteNotFoundException;
 class SchedulerCronForm extends ConfigFormBase {
 
   /**
+   * The module handler service.
+   *
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface
+   */
+  protected $moduleHandler;
+
+  /**
+   * Creates a SchedulerCronForm instance.
+   *
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
+   *   The module handler service.
+   */
+  public function __construct(ModuleHandlerInterface $moduleHandler) {
+    $this->moduleHandler = $moduleHandler;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static($container->get('module_handler'));
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function getFormId() {
@@ -46,7 +72,7 @@ class SchedulerCronForm extends ConfigFormBase {
       '#type' => 'checkbox',
       '#title' => $this->t('Log every activation and completion message.'),
       '#default_value' => $config->get('log'),
-      '#description' => $this->t('When this option is checked, Scheduler will write an entry to the dblog every time the lightweight cron process is started and completed. This is useful during set up and testing, but can result in a large number of log entries. Any actions performed during the lightweight cron run will always be logged regardless of this setting.'),
+      '#description' => $this->t('When this option is checked, Scheduler will write an entry to the log every time the lightweight cron process is started and completed. This is useful during set up and testing, but can result in a large number of log entries. Any actions performed during the lightweight cron run will always be logged regardless of this setting.'),
     ];
     $form['cron_settings']['lightweight_access_key'] = [
       '#type' => 'textfield',
@@ -120,11 +146,11 @@ class SchedulerCronForm extends ConfigFormBase {
     module_load_include('inc', 'scheduler', 'scheduler.cron');
     _scheduler_run_cron();
 
-    try {
+    if ($this->moduleHandler->moduleExists('dblog')) {
       $url = Url::fromRoute('dblog.overview')->toString();
       $message = $this->t('Lightweight cron run completed. See the <a href="@url">log</a> for details.', array('@url' => $url));
     }
-    catch (RouteNotFoundException $e) {
+    else {
       // If the Database Logging module is not enabled the route to the log
       // overview does not exist. Show a simple status message.
       $message = $this->t('Lightweight cron run completed.');
