Skip to content

Replace cron with supercronic#185

Draft
colisee wants to merge 5 commits intoLibreBooking:masterfrom
colisee:issues/183
Draft

Replace cron with supercronic#185
colisee wants to merge 5 commits intoLibreBooking:masterfrom
colisee:issues/183

Conversation

@colisee
Copy link
Collaborator

@colisee colisee commented Mar 16, 2026

Changes

  • Stop installing cron and use supercronic instead
  • Remove output redirection in file lb-jobs-cron
  • Use the same entrypoint for both application and cron roles
  • Use a different container command to distinguish between application and cron roles
  • Adapt examples

Close #183

@colisee colisee added bug Something isn't working enhancement New feature or request labels Mar 16, 2026
Copy link
Collaborator

@ikke-t ikke-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good, thanks.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the in-container cron-based job scheduling approach with supercronic, aiming to fix missing/redirected job logs and simplify container roles by using a single shared entrypoint.

Changes:

  • Stop installing cron and switch scheduled job execution to supercronic.
  • Remove stdout/stderr redirection from lb-jobs-cron job definitions.
  • Update docker-compose examples to run the cron role via command: supercronic /config/lb-jobs-cron.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
setup.sh Removes cron package installation from the image build.
lb-jobs-cron Removes > /dev/stdout 2>&1 redirections from scheduled jobs.
bin/cron.sh Deletes the dedicated cron entrypoint script.
Dockerfile Adds a Go build stage intended to build/copy supercronic into the final image.
.examples/docker/docker-compose-public.yml Updates job services to use supercronic via command: instead of cron.sh.
.examples/docker/docker-compose-local.yml Updates the cron service to use supercronic via command: instead of cron.sh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Dockerfile Outdated

# Build supercronic
FROM golang:trixie AS supercronic
ADD https://github.com/aptible/supercronic.git src
restart: always
user: root
entrypoint: /usr/local/bin/cron.sh
command: supercronic /config/lb-jobs-cron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete review of the scheduling aspects

4 participants