File tree Expand file tree Collapse file tree
root/etc/s6-overlay/s6-rc.d/init-duckdns Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,10 +21,12 @@ case "$UPDATE_INTERVAL" in
2121 echo "Update interval must be between 1-24 hours"
2222 exit 1
2323 fi
24- HOURS="*/$HOURS"
25-
26- # We want a single run per selected hour, with the template's jitter handling
27- # the exact seconds.
24+ # Cron hour field is 0-23, so 24h must be normalized to daily at midnight.
25+ if (( HOURS == 24 )); then
26+ HOURS="0"
27+ else
28+ HOURS="*/$HOURS"
29+ fi
2830 MINUTES="0"
2931 ;;
3032 *)
@@ -33,9 +35,13 @@ case "$UPDATE_INTERVAL" in
3335 echo "Update interval must be between 5-60 minutes"
3436 exit 1
3537 fi
36- MINUTES="*/$MINUTES"
37-
3838 HOURS="*"
39+ # Cron minute field is 0-59, so 60m must be normalized to top of each hour.
40+ if (( MINUTES == 60 )); then
41+ MINUTES="0"
42+ else
43+ MINUTES="*/$MINUTES"
44+ fi
3945 ;;
4046esac
4147
You can’t perform that action at this time.
0 commit comments