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.
This commit is contained in:
Jef LeCompte
2025-07-20 14:05:49 -07:00
parent f52018fa62
commit b5cec7c951
2 changed files with 20 additions and 2 deletions

View File

@@ -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).

View File

@@ -1,6 +1,6 @@
#!/bin/sh
SLEEP_TIME=${SLEEP_TIME:-10800}
SLEEP_TIME=${SLEEP_TIME:-21600}
while true; do
DATE=$(date)