diff --git a/Dockerfile b/Dockerfile index ae4a057..3aeb36c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /usr/strong-api-fetch COPY --from=builder /usr/local/cargo/bin/strong-api-fetch /usr/bin/strong-api-fetch # Add the cron job: run every 12 hours and log output -RUN echo "*/1 * * * * /usr/bin/strong-api-fetch >> /var/log/cron.log 2>&1" > /etc/cron.d/strong-api-fetch +RUN echo "0,30 18-20 * * * /usr/bin/strong-api-fetch >> /var/log/cron.log 2>&1" > /etc/cron.d/strong-api-fetch # Ensure the cron job file has proper permissions RUN chmod 0644 /etc/cron.d/strong-api-fetch diff --git a/README.MD b/README.MD index 45469b4..c174f54 100644 --- a/README.MD +++ b/README.MD @@ -5,6 +5,7 @@ This is a Rust-based service to fetch workouts from the [Strong App](https://www The URL to the API backend is not provided here, for now, because it's not entirely public and because of possible legal implications. +If using docker-compose, the service will run 18:00, 18:30, 19:00, 19:30, 20:00 and 20:30, but you can change this in the `Dockerfile`. ## How to use 0. Have your Clckhouse database ready and running @@ -27,4 +28,6 @@ The URL to the API backend is not provided here, for now, because it's not entir 1. Make sure you have Docker and Docker Compose installed. 2. Create a `.env` file in the root directory with the same content as above. -3Start the service with `docker compose up -d`. \ No newline at end of file +3Start the service with `docker compose up -d`. + +