diff --git a/class/cron_importzugferd.class.php b/class/cron_importzugferd.class.php index 042be8d..36073aa 100755 --- a/class/cron_importzugferd.class.php +++ b/class/cron_importzugferd.class.php @@ -131,12 +131,6 @@ class CronImportZugferd $langs->load('importzugferd@importzugferd'); - // Check if we should run based on frequency - if (!$this->shouldRunImport()) { - $this->output = 'Skipped - not scheduled to run (frequency: '.getDolGlobalString('IMPORTZUGFERD_IMPORT_FREQUENCY', 'manual').')'; - return 0; - } - // Reset counters $this->imported_count = 0; $this->skipped_count = 0; @@ -144,7 +138,12 @@ class CronImportZugferd $this->errors = array(); $folderResult = $this->importFromFolder(); - $mailboxResult = $this->fetchFromMailbox(); + + // IMAP nur wenn konfiguriert + $mailboxResult = 0; + if (!empty(getDolGlobalString('IMPORTZUGFERD_IMAP_HOST'))) { + $mailboxResult = $this->fetchFromMailbox(); + } // Update last run time $this->updateLastRunTime();