fix: too strict cron expression validation (#29138)

This commit is contained in:
Daniel Dietzler
2026-06-16 13:20:40 +00:00
committed by GitHub
parent a23a7c69ae
commit e70a1163f3
3 changed files with 13 additions and 7 deletions
@@ -319,14 +319,14 @@ describe(SystemConfigService.name, () => {
it('should accept valid cron expressions', async () => {
mocks.config.getEnv.mockReturnValue(mockEnvData({ configFile: 'immich-config.json' }));
mocks.systemMetadata.readFile.mockResolvedValue(
JSON.stringify({ library: { scan: { cronExpression: '0 0 * * *' } } }),
JSON.stringify({ library: { scan: { cronExpression: '0 0 */3 * *' } } }),
);
await expect(sut.getSystemConfig()).resolves.toMatchObject({
library: {
scan: {
enabled: true,
cronExpression: '0 0 * * *',
cronExpression: '0 0 */3 * *',
},
},
});