Skip to content

Comments

WIK-2147: Group log archives by year subdirectory#12

Open
tosfos wants to merge 1 commit intomasterfrom
WIK-2147-archive-year-subdirs
Open

WIK-2147: Group log archives by year subdirectory#12
tosfos wants to merge 1 commit intomasterfrom
WIK-2147-archive-year-subdirs

Conversation

@tosfos
Copy link
Contributor

@tosfos tosfos commented Feb 11, 2026

WIK-2147: Update cron image logs archival script directory structure

Archives are now stored in year subdirectories as requested:

  • Before: 2025-01-01.taskname.tar.gz, 2025-01-02.taskname.tar.gz (flat)
  • After: 2025/01-01.taskname.tar.gz, 2025/01-02.taskname.tar.gz

Changes

  • archive-cron-logs.sh: When creating an archive, extract year from the period key, create CRON_LOG_DIR/YYYY/, and write the archive as YYYY/rest.tar.gz. When reading the newest existing archive, derive previous_period from path (year + basename) when the archive lives in a year subdir.
  • archive-cron-logs-functions.sh: find_newest_archive now searches both the flat directory (*.tar.gz) and year subdirs (*/*.tar.gz), so existing flat archives and new year-subdir archives are both considered when determining the newest.
  • README.md: Document the directory layout and backward compatibility.

Backward compatible: existing flat archives remain valid; new runs create only year-subdir archives.

Made with Cursor

- New archives go under CRON_LOG_DIR/YYYY/ (e.g. 2025/01-01_task.tar.gz).
- find_newest_archive now searches both flat dir and year subdirs.
- When newest archive is in a year subdir, previous_period is derived from year-basename.
- README: document directory layout and backward compatibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link

🐳 The image based on 4cdbbaf4 commit has been built with 20260211-12 tag as ghcr.io/wikiteq/cron:20260211-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant