diff --git a/Services.ZUGFeRDService/Config.vb b/Services.ZUGFeRDService/Config.vb
index e1ca2785..bd0a7b4b 100644
--- a/Services.ZUGFeRDService/Config.vb
+++ b/Services.ZUGFeRDService/Config.vb
@@ -37,6 +37,13 @@
'''
Public Property MaxAttachmentSizeInMegaBytes As Integer = -1
+ '''
+ ''' Minimum file age. If one file is newer than this, the whole group will be skipped
+ ''' to ensure that all files of a group have been created.
+ '''
+ '''
+ Public Property MinFileAgeInMinutes As Integer = 5
+
Public Property AllowFacturX As Boolean = False
Public Property AllowXRechnung As Boolean = False
Public Property AllowZugferd10 As Boolean = True
diff --git a/Services.ZUGFeRDService/ThreadRunner.vb b/Services.ZUGFeRDService/ThreadRunner.vb
index 6493b08f..9662eef3 100644
--- a/Services.ZUGFeRDService/ThreadRunner.vb
+++ b/Services.ZUGFeRDService/ThreadRunner.vb
@@ -45,6 +45,7 @@ Public Class ThreadRunner
.ExceptionEmailAddress = _config.Config.ExceptionEmailAddress,
.IgnoreRejectionStatus = _config.Config.Custom.IgnoreRejectionStatus,
.MaxAttachmentSizeInMegaBytes = _config.Config.Custom.MaxAttachmentSizeInMegaBytes,
+ .MinFileAgeInMinutes = _config.Config.Custom.MinFileAgeInMinutes,
.NamePortal = _config.Config.PORTAL_NAME,
.EmailOutProfileId = _config.Config.MSSQLEmailOutAccountID,
.AllowFacturX = _config.Config.Custom.AllowFacturX,
@@ -60,6 +61,7 @@ Public Class ThreadRunner
_logger.Debug("ExceptionEmailAddress: [{0}]", oArgs.ExceptionEmailAddress)
_logger.Debug("IgnoreRejectionStatus: [{0}]", oArgs.IgnoreRejectionStatus)
_logger.Debug("MaxAttachmentSizeInMegaBytes: [{0}]", oArgs.MaxAttachmentSizeInMegaBytes)
+ _logger.Debug("MinFileAgeInMinutes: [{0}]", oArgs.MinFileAgeInMinutes)
_jobArguments = oArgs