From aed2376e6abf24ff4da87709ba8d15856df4ecb7 Mon Sep 17 00:00:00 2001 From: kt Date: Sat, 3 Oct 2026 14:38:14 -0700 Subject: [PATCH 1/3] docker: run the scheduled sync once, not twice The crontab was written to /etc/cron.d and then installed again with crontab. dcron reads /etc/cron.d on its own, so the job was registered twice and every sync ran as two processes at once. The file now lives in /app, so only the installed copy exists. --- CHANGELOG.md | 4 ++++ scripts/entry.sh | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1f52c..2bdb192 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Unreleased + +- docker: the scheduled sync ran twice at once; the crontab was written to `/etc/cron.d`, which dcron reads by itself, and then installed again with `crontab` + ## v0.5.0 (2026-09-23) - add `Last Reviewer` PR field, who left the most recent submitted review; refreshed on open PRs too ([#27](https://github.com/katbyte/ghp-sync/pull/27)) diff --git a/scripts/entry.sh b/scripts/entry.sh index f433791..f3d3a55 100644 --- a/scripts/entry.sh +++ b/scripts/entry.sh @@ -5,10 +5,10 @@ #copy env env >> /etc/profile -#setup cron -echo "$SYNC_CRON /app/scripts/run.sh 2>&1 | tee -a /var/log/ghp-sync.log" > /etc/cron.d/crontab -chmod 0644 /etc/cron.d/crontab -crontab /etc/cron.d/crontab +#setup cron: the file stays out of /etc/cron.d, which dcron reads on its own - a crontab written +# there and then installed with crontab is registered twice, and every sync runs twice at once +echo "$SYNC_CRON /app/scripts/run.sh 2>&1 | tee -a /var/log/ghp-sync.log" > /app/crontab +crontab /app/crontab touch /var/log/cron.log # start cron From e85401dc69528f85db78fb7546cd1251838f442c Mon Sep 17 00:00:00 2001 From: kt Date: Sat, 3 Oct 2026 14:38:40 -0700 Subject: [PATCH 2/3] changelog: link #29 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bdb192..467d51e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Unreleased -- docker: the scheduled sync ran twice at once; the crontab was written to `/etc/cron.d`, which dcron reads by itself, and then installed again with `crontab` +- docker: the scheduled sync ran twice at once; the crontab was written to `/etc/cron.d`, which dcron reads by itself, and then installed again with `crontab` ([#29](https://github.com/katbyte/ghp-sync/pull/29)) ## v0.5.0 (2026-09-23) From e87c74e2dfa494530780b69c3addf772fd051767 Mon Sep 17 00:00:00 2001 From: kt Date: Sat, 3 Oct 2026 14:43:06 -0700 Subject: [PATCH 3/3] changelog: v0.5.1, compose pins :v0.5.1 --- CHANGELOG.md | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 467d51e..604f259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Unreleased +## v0.5.1 (2026-10-03) - docker: the scheduled sync ran twice at once; the crontab was written to `/etc/cron.d`, which dcron reads by itself, and then installed again with `crontab` ([#29](https://github.com/katbyte/ghp-sync/pull/29)) diff --git a/docker-compose.yml b/docker-compose.yml index 19162f6..fc16a50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.6" services: ghp-sync: # published on release; `docker compose pull` picks up a new build of this tag - image: ghcr.io/katbyte/ghp-sync:v0.5.0 + image: ghcr.io/katbyte/ghp-sync:v0.5.1 container_name: ghp-sync environment: - "TZ=America/Vancouver"