This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Add cron service to run load_from_static 4x daily#1
Draft
Conversation
Co-authored-by: tiankaima <91816094+tiankaima@users.noreply.github.com>
Co-authored-by: tiankaima <91816094+tiankaima@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add cron job to run load_from_static four times daily
Add cron service to run load_from_static 4x daily
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a cron job to automatically sync data from Life-USTC/static cache into the database every 6 hours (00:00, 06:00, 12:00, 18:00 UTC).
Changes
src/crontab- Cron schedule:0 0,6,12,18 * * *src/Dockerfile.cron- Dedicated image with cron daemon, git (for repo cloning), and Django dependencies. Entrypoint pipes environment vars to/etc/environmentso cron jobs inherit DB credentials and Django settings.docker-compose.yml/docker-compose.prod.yml- Addedcronservice that shares database network withwebservice.github/workflows/docker-build-push-cron.yml- CI/CD to build and pushghcr.io/life-ustc/server-cron:latestUsage
The cron container runs indefinitely with
tail -f /var/log/cron.log, outputting job execution logs to stdout.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.