You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/docker.en.md
+88Lines changed: 88 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,94 @@ docker run -d \
135
135
136
136
## Advanced Configuration
137
137
138
+
### Custom Cron Schedule
139
+
140
+
By default, the DDNS container automatically updates DNS records every 5 minutes. You can customize the scheduled task execution interval using the `DDNS_CRON` environment variable.
141
+
142
+
The `DDNS_CRON` environment variable uses standard cron expression format: `minute hour day month weekday`
143
+
144
+
**Examples**:
145
+
146
+
```bash
147
+
# Run every 10 minutes
148
+
docker run -d \
149
+
-e DDNS_CRON="*/10 * * * *" \
150
+
-e DDNS_DNS=dnspod \
151
+
-e DDNS_ID=12345 \
152
+
-e DDNS_TOKEN=mytokenkey \
153
+
-e DDNS_IPV4=example.com \
154
+
--network host \
155
+
newfuture/ddns
156
+
157
+
# Run every hour
158
+
docker run -d \
159
+
-e DDNS_CRON="0 * * * *" \
160
+
-e DDNS_DNS=dnspod \
161
+
-e DDNS_ID=12345 \
162
+
-e DDNS_TOKEN=mytokenkey \
163
+
-e DDNS_IPV4=example.com \
164
+
--network host \
165
+
newfuture/ddns
166
+
167
+
# Run once daily at 2 AM
168
+
docker run -d \
169
+
-e DDNS_CRON="0 2 * * *" \
170
+
-e DDNS_DNS=dnspod \
171
+
-e DDNS_ID=12345 \
172
+
-e DDNS_TOKEN=mytokenkey \
173
+
-e DDNS_IPV4=example.com \
174
+
--network host \
175
+
newfuture/ddns
176
+
177
+
# Run every minute (most frequent for cron)
178
+
docker run -d \
179
+
-e DDNS_CRON="* * * * *" \
180
+
-e DDNS_DNS=dnspod \
181
+
-e DDNS_ID=12345 \
182
+
-e DDNS_TOKEN=mytokenkey \
183
+
-e DDNS_IPV4=example.com \
184
+
--network host \
185
+
newfuture/ddns
186
+
```
187
+
188
+
**Cron Expression Reference**:
189
+
190
+
| Field | Allowed Values | Allowed Special Characters |
0 commit comments