Date and Time Inputs
Time Window
Label a Schedule
Batch scripts often run for a named time window. Modeling the label keeps schedule decisions visible without depending on the current clock.
Program
Play the script to choose the window and see the planned schedule label.
window_label_plan.sh
#!/usr/bin/env bash
window=
case "$window" in
daily) label="daily-00Z"; retention="7d" ;;
hourly) label="hourly-15"; retention="24h" ;;
esac
echo "$label retention=$retention"
#!/usr/bin/env bash
window=
case "$window" in
daily) label="daily-00Z"; retention="7d" ;;
hourly) label="hourly-15"; retention="24h" ;;
esac
echo "$label retention=$retention"
time window
A time window names the period a batch job covers.
schedule label
Labels make scheduled output easier to group and inspect.
retention
Retention says how long outputs from that window should be kept.