diff --git a/templates/scripts/config/crontabs_collector.php.jinja2 b/templates/scripts/config/crontabs_collector.php.jinja2
index b7e3a32097e88a9d6cdb6300314a189f2b943912..7f194fbb7e62bd09d913f581c0850e90c6111ab8 100755
--- a/templates/scripts/config/crontabs_collector.php.jinja2
+++ b/templates/scripts/config/crontabs_collector.php.jinja2
@@ -38,6 +38,25 @@ foreach ($input_files as $input_file) {
     continue;
   }
 
+  // Make sure to only use cronjobs for this host.
+  $host = gethostname();
+
+  foreach ($input_file_decoded as $key => $cronjob) {
+    // Make sure we have a valid entry.
+    if (!is_array($cronjob) || !isset($cronjob['host'])) {
+      continue;
+    }
+
+    // Remove non matching entries.
+    if ($host && $cronjob['host'] !== $host) {
+      unset($input_file_decoded[$key]);
+      continue;
+    }
+
+    // Remove the "host" key as this is not a valid cron key.
+    unset($input_file_decoded[$key]['host']);
+  }
+
   // Merge the decoded file contents to the result.
   $crontab_definitions = array_merge($crontab_definitions, $input_file_decoded);
 }