diff --git a/scheduler.module b/scheduler.module
index 4a7e324..c792b5d 100644
--- a/scheduler.module
+++ b/scheduler.module
@@ -28,22 +28,6 @@ define('SCHEDULER_DEFAULT_TIME', '00:00:00');
 define('SCHEDULER_DATE_LETTERS', 'djmnFMyY');
 define('SCHEDULER_TIME_LETTERS', 'hHgGisaA');
 
-/**
- * Implements hook_menu().
- */
-function scheduler_menu() {
-  $items = array();
-  $items['scheduler/cron'] = array(
-    'title' => 'Lightweight cron handler',
-    'description' => 'Run the lightweight cron process',
-    'page callback' => '_scheduler_run_cron',
-    'access callback' => '_scheduler_cron_access',
-    'access arguments' => array(2),
-    'type' => MENU_CALLBACK,
-    'file' => 'scheduler.cron.inc',
-  );
-  return $items;
-}
 
 /**
  * Return the users access to the scheduler list page.
diff --git a/scheduler.routing.yml b/scheduler.routing.yml
index 25dfe96..54253b6 100644
--- a/scheduler.routing.yml
+++ b/scheduler.routing.yml
@@ -14,3 +14,12 @@ scheduler.cron_form:
     _form: \Drupal\scheduler\Form\SchedulerCronForm
   requirements:
     _permission: 'administer scheduler'
+
+scheduler.lightweight_cron:
+  path: '/scheduler/cron/{cron_key}'
+  defaults:
+    _controller: '\Drupal\scheduler\Controller\LightweightCronController::index'
+    _description: 'Run the lightweight cron process'
+    _title: 'Lightweight cron'
+  requirements:
+    _custom_access: '\Drupal\scheduler\Controller\LightweightCronController::access'
diff --git a/src/Controller/LightweightCronController.php b/src/Controller/LightweightCronController.php
new file mode 100644
index 0000000..eba50d7
--- /dev/null
+++ b/src/Controller/LightweightCronController.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\scheduler\Controller\LightweightCronController.
+ */
+
+namespace Drupal\scheduler\Controller;
+
+use Drupal\Core\Access\AccessResult;
+use Drupal\Core\Controller\ControllerBase;
+use Symfony\Component\HttpFoundation\RedirectResponse;
+
+/**
+ * Class LightweightCronController.
+ *
+ * @package Drupal\scheduler\Controller
+ */
+class LightweightCronController extends ControllerBase {
+
+  /**
+   * Index.
+   *
+   * @return string
+   *   Return Hello string.
+   */
+  public function index() {
+
+    module_load_include('inc', 'scheduler', 'scheduler.cron');
+
+    _scheduler_run_cron();
+
+    return new RedirectResponse('/');
+  }
+
+  public function access($cron_key) {
+
+    $valid_cron_key = \Drupal::config('scheduler.settings')
+      ->get('lightweight_cron_access_key');
+    return AccessResult::allowedIf($valid_cron_key == $cron_key);
+  }
+}
