From b5cec7c951da794041820407860bcee8e0c5b24a Mon Sep 17 00:00:00 2001 From: Jef LeCompte Date: Sun, 20 Jul 2025 14:05:49 -0700 Subject: [PATCH] docs: include so links to wiki, update SLEEP_TIME default SLEEP_TIME is now 6 hours instead of 3 because of the default TIMESPAN of 6 hours. --- README.md | 20 +++++++++++++++++++- entrypoint.sh | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a94f1ab..ad5bb8e 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ See [Environment variables](#environment-variables) for configuration options. | `POSTAL_CODE` | Postal code of where shows are available. | 30309 | | `USER_AGENT` | Custom user agent string for HTTP requests. | Uses random if not specified | | `TZ` | Timezone | System default | -| `SLEEP_TIME` | Sleep time before next run in seconds (default: 10800, Only used with Docker.) | 10800 | +| `SLEEP_TIME` | Sleep time before next run in seconds (default: 21600, Only used with Docker.) | 21600 | | `OUTPUT_FILE` | Output file name (default: xmltv.xml) | xmltv.xml | ### Command line arguments @@ -69,3 +69,21 @@ See [Environment variables](#environment-variables) for configuration options. | `--userAgent` | Custom user agent string for HTTP requests. | Uses random if not specified | | `--timezone` | Timezone | System default | | `--outputFile` | Output file name (default: xmltv.xml) | xmltv.xml | + +## Setup and running in intervals + +### Running natively + +You can run zap2xml natively on your system. It is recommended to use a task scheduler to run it in intervals. + +Here are some links to get you started on your machine: + +- Linux and Raspberry Pi: https://github.com/jef/zap2xml/wiki/Running-on-Linux-and-Raspberry-Pi +- macOS: https://github.com/jef/zap2xml/wiki/Running-on-macOS +- Windows: https://github.com/jef/zap2xml/wiki/Running-on-Windows + +If you want to run zap2xml in intervals, you can use a task scheduler like `cron` on Linux or the Task Scheduler on Windows. Each of the wiki pages above has a section on how to set up zap2xml to run in intervals. + +### Running in Docker + +You can run zap2xml in a Docker container. The `SLEEP_TIME` environment variable can be used to set the interval between runs. The default is 21600 seconds (6 hours). diff --git a/entrypoint.sh b/entrypoint.sh index 910d2bd..3c34671 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/sh -SLEEP_TIME=${SLEEP_TIME:-10800} +SLEEP_TIME=${SLEEP_TIME:-21600} while true; do DATE=$(date)