{"record":{"id":"09a7c6eb2abfe111","repo":"coollabsio/coolify","slug":"invalid-cron-human-expression-for-disk-usage-che","errorCode":null,"errorMessage":"Invalid Cron / Human expression for Disk Usage Check Frequency.","messagePattern":"Invalid Cron / Human expression for Disk Usage Check Frequency\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"app/Livewire/Server/Advanced.php","lineNumber":82,"sourceCode":"        }\n    }\n\n    public function instantSave()\n    {\n        try {\n            $this->syncData(true);\n            $this->dispatch('success', 'Server updated.');\n        } catch (\\Throwable $e) {\n            return handleError($e, $this);\n        }\n    }\n\n    public function submit()\n    {\n        try {\n            if (! validate_cron_expression($this->serverDiskUsageCheckFrequency)) {\n                $this->serverDiskUsageCheckFrequency = $this->server->settings->getOriginal('server_disk_usage_check_frequency');\n                throw new \\Exception('Invalid Cron / Human expression for Disk Usage Check Frequency.');\n            }\n            $this->syncData(true);\n            $this->dispatch('success', 'Server updated.');\n        } catch (\\Throwable $e) {\n            return handleError($e, $this);\n        }\n    }\n\n    public function render()\n    {\n        return view('livewire.server.advanced');\n    }\n}\n","sourceCodeStart":64,"sourceCodeEnd":96,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Livewire/Server/Advanced.php#L64-L96","documentation":"The server Advanced screen's submit() validates serverDiskUsageCheckFrequency with validate_cron_expression() (cron-parser CronExpression::isValid() plus the VALID_CRON_STRINGS human presets). On failure the field is reset to the original DB value via getOriginal() and the exception surfaces through handleError - nothing is persisted.","triggerScenarios":"Typing an invalid frequency such as 'every 5 minutes', a 6-field cron, '*/2 * * *' (missing a field), or a preset key that does not exist in VALID_CRON_STRINGS; pasting a crontab line that includes the username column.","commonSituations":"Users used to systemd timer calendars or Quartz expressions; copy-paste from blog cron examples; typos in the human presets.","solutions":["Enter a valid 5-field cron, e.g. '*/5 * * * *'","Or an exact Coolify preset string like 'every_minute' (no free-form phrasing)","Trim stray whitespace/quotes before saving","Test first: php artisan tinker --execute 'var_dump(validate_cron_expression(\"*/5 * * * *\"));'"],"exampleFix":"// before\n$this->serverDiskUsageCheckFrequency = 'every 5 minutes';\n\n// after\n$this->serverDiskUsageCheckFrequency = '*/5 * * * *';","handlingStrategy":"validation","validationCode":"if (! validate_cron_expression($this->serverDiskUsageCheckFrequency)) {\n    // fix the expression before submit; stored value is untouched\n}","typeGuard":null,"tryCatchPattern":"Keep submit()'s try/catch with return handleError($e, $this); the component already restores the original DB value on failure - rely on that instead of persisting partial settings.","preventionTips":["Use the preset picker or validated 5-field cron only","Test expressions with validate_cron_expression() in tinker before saving","Remember the field resets to the original value after a failure - re-enter your intended schedule"],"tags":["cron","server","settings","validation"],"backgroundTag":"cron-expression-invalid","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}