Skip to content

Route cron output to container stdout/stderr#19

Open
StefanMarkmann wants to merge 1 commit intomainfrom
codex/update-cron-entry-for-output-redirection
Open

Route cron output to container stdout/stderr#19
StefanMarkmann wants to merge 1 commit intomainfrom
codex/update-cron-entry-for-output-redirection

Conversation

@StefanMarkmann
Copy link
Owner

Motivation

  • Make scheduled backup logs surface in the container logs by routing cron job output to the container PID1 fds.
  • Ensure the original timestamps emitted by /backup.sh remain intact by appending raw stdout/stderr to the container's main fds.
  • Keep scheduled behavior unchanged while improving observability for scheduled runs.

Description

  • Updated the cron entry in src/run.sh to append output redirection: ${SCHEDULE} /bin/sh /cron.sh >> /proc/1/fd/1 2>> /proc/1/fd/2.
  • Retained the existing cron.sh wrapper which execs /bin/sh /backup.sh so backup output is forwarded untouched.
  • File permissions and the scheduler invocation (crond -n -s) remain unchanged.

Testing

  • No automated tests were executed in this environment.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant