Repository navigation
v0.6.1-beta - Fix Automated Scheduled Sync
What's Changed
This release fixes the automated nightly CRON job that syncs TMDB metadata and OMDb ratings. Previously, the job was failing silently due to missing Docker environment variables in the cron context.
Bug Fixes
- Fixed CRON environment isolation: Created wrapper script (
run-scheduled-sync.sh) that explicitly exports all required environment variables (TMDB_API_KEY, DATABASE_*, OMDB_API_KEY, TZ) to the cron context - Fixed duplicate execution: Eliminated duplicate cron jobs by using only user crontab (removed
/etc/cron.d/configuration) - Fixed Docker logs visibility: Added supervisord
sync-log-tailprocess to stream sync output to Docker logs - Fixed timezone alignment: Updated
DateTime.phpto respect theTZenvironment variable instead of using hardcoded timezone
Improvements
- Dual logging: Sync output now appears in both Docker logs and file logs (
storage/logs/scheduled-sync.log) - Added OMDB_API_KEY: Environment variable is now properly passed to container for OMDb ratings sync
- Better error visibility: Wrapper script logs start/completion messages with timestamps to Docker logs
Technical Details
New Files:
build/scripts/run-scheduled-sync.sh- Wrapper script with environment variable exports
Modified Files:
build/Dockerfile- Install wrapper script as user crontab onlybuild/config/supervisord.conf- Add sync-log-tail processdocker-compose.yml- Add OMDB_API_KEY environment variabledocker/cron/pathary-sync- Update crontab schedule to 2:00 AMsrc/ValueObject/DateTime.php- Use TZ environment variablebuild/scripts/entrypoint.sh- Update info message
Verification
The automated sync now:
- ✅ Runs successfully at scheduled time (2:00 AM)
- ✅ Syncs both TMDB metadata and OMDb ratings
- ✅ Uses consistent timezone (respects TZ environment variable)
- ✅ Executes only once per schedule (no duplicates)
- ✅ Outputs visible in Docker logs:
docker compose logs app
Full Changelog: v0.6.0-beta...v0.6.1-beta