diff --git a/modules/cron/bin/cron.php b/modules/cron/bin/cron.php
index 105062cc4c48fd76f6f1b0c5087f30835401e679..073c278cbea20179f238d99e5477a11acf568ce8 100755
--- a/modules/cron/bin/cron.php
+++ b/modules/cron/bin/cron.php
@@ -33,7 +33,7 @@ if (!array_key_exists('t', $options)) {
 }
 
 $tag = $options['t'];
-$cron = new sspmod_cron_Cron();
+$cron = new SimpleSAML\Module\cron\Cron();
 if (!$cron->isValidTag($tag)) {
     echo "Invalid tag option '$tag'.\n";
     exit(2);
diff --git a/modules/cron/lib/Cron.php b/modules/cron/lib/Cron.php
index 40390329ba0bb31b09d48e1ca3acd4e24d1b88d9..b2532e75fa098ce6892c37287d64462bc366e56b 100644
--- a/modules/cron/lib/Cron.php
+++ b/modules/cron/lib/Cron.php
@@ -1,24 +1,26 @@
 <?php
 
+namespace  SimpleSAML\Module\cron;
+
 /**
  * Handles interactions with SSP's cron system/hooks.
  */
-class sspmod_cron_Cron
+class Cron
 {
     /**
      * The configuration for the Cron module
-     * @var SimpleSAML_Configuration
+     * @var \SimpleSAML_Configuration
      */
     private $cronconfig;
 
     /*
-     * @param SimpleSAML_Configuration $cronconfig The cron configuration to use. If not specified defaults
+     * @param \SimpleSAML_Configuration $cronconfig The cron configuration to use. If not specified defaults
      * to `config/module_cron.php`
      */
-    public function __construct(SimpleSAML_Configuration $cronconfig = null)
+    public function __construct(\SimpleSAML_Configuration $cronconfig = null)
     {
         if ($cronconfig == null) {
-            $cronconfig = SimpleSAML_Configuration::getConfig('module_cron.php');
+            $cronconfig = \SimpleSAML_Configuration::getConfig('module_cron.php');
         }
         $this->cronconfig = $cronconfig;
     }
@@ -42,10 +44,10 @@ class sspmod_cron_Cron
             'tag' => $tag,
         );
 
-        SimpleSAML\Module::callHooks('cron', $croninfo);
+        \SimpleSAML\Module::callHooks('cron', $croninfo);
 
         foreach ($summary as $s) {
-            SimpleSAML\Logger::debug('Cron - Summary: ' . $s);
+            \SimpleSAML\Logger::debug('Cron - Summary: ' . $s);
         }
 
         return $croninfo;
diff --git a/modules/cron/www/cron.php b/modules/cron/www/cron.php
index 6ca986e7a0022419b5c54ce126ae9c1720cfa4da..4f22fc5df0b111403d9fd6e119264a8d083b04f2 100644
--- a/modules/cron/www/cron.php
+++ b/modules/cron/www/cron.php
@@ -10,7 +10,7 @@ if (!is_null($cronconfig->getValue('key'))) {
 	}
 }
 
-$cron = new sspmod_cron_Cron($cronconfig);
+$cron = new SimpleSAML\Module\cron\Cron();
 if (!$cron->isValidTag($_REQUEST['tag'])) {
     SimpleSAML\Logger::error('Cron - Illegal tag [' . $_REQUEST['tag'] . '].');
     exit;
@@ -21,6 +21,7 @@ $url = \SimpleSAML\Utils\HTTP::getSelfURL();
 $time = date(DATE_RFC822);
 
 $croninfo = $cron->runTag($_REQUEST['tag']);
+$summary = $croninfo['summary'];
 
 if ($cronconfig->getValue('sendemail', TRUE) && count($summary) > 0) {