コンテンツにスキップ
#0259
CronExecFiles

The Monday report is a URL that rewrites itself

A retail analyst sends a weekly performance report to eleven store managers. Every Monday: pull the numbers, refresh the spreadsheet, export to PDF, attach, send, field three replies asking for last week's.

Now a cron entry fires at 6:00 Monday. An exec script pulls the week's sales, fills the LibreOffice template, and runs soffice --headless --convert-to pdf. The result overwrites reports/weekly.pdf in the container. The eleven managers have one bookmark. They open it; it's this week's.

The files service journals every write, so the overwrite doesn't destroy anything. A manager who wants the week before Christmas opens reports/weekly.pdf?at=2025-12-22T07:00:00Z and gets exactly that Monday's file.

No attachments, no versioned filenames, no "can you resend the old one." The report has one address and every past version.

The report has one address and every past version.