Ok - don't laugh[...]
My coding skills are pitiful so I asked my resident Ai to write a bash
script to call a webcam script (I did write this one) only between
sunrise and sunset. it produced this and it works! My question is - how
can I amend the script so it starts 30 minutes BEFORE sunrise and stops
30 Minutes after?
# Convert sunrise and sunset times to seconds since epoch SUNRISE_EPOCH=$(date -d "$SUNRISE" +%s)
SUNSET_EPOCH=$(date -d "$SUNSET" +%s)
CURRENT_EPOCH=$(date +%s)
Ok - don't laugh[...]
My coding skills are pitiful so I asked my resident Ai to write a bash
script to call a webcam script (I did write this one) only between
sunrise and sunset. it produced this and it works! My question is - how
can I amend the script so it starts 30 minutes BEFORE sunrise and stops
30 Minutes after?
SUNRISE_EPOCH=$(date -d "$SUNRISE" +%s)
SUNSET_EPOCH=$(date -d "$SUNSET" +%s)
CURRENT_EPOCH=$(date +%s)
how can I amend the script so it starts 30 minutes BEFORE sunrise and
stops 30 Minutes after?
... how can I amend the script so it starts 30 minutes BEFORE sunrise
and stops 30 Minutes after?
...
SUNRISE_EPOCH=$(date -d "$SUNRISE" +%s)
SUNSET_EPOCH=$(date -d "$SUNSET" +%s)
On Thu, 12 Dec 2024 12:43:14 +0000, DrStevenStrange wrote:
... how can I amend the script so it starts 30 minutes BEFORE sunrise
and stops 30 Minutes after?
...
SUNRISE_EPOCH=$(date -d "$SUNRISE" +%s)
SUNSET_EPOCH=$(date -d "$SUNSET" +%s)
How about
SUNRISE_EPOCH=$(($(date -d "$SUNRISE" +%s) - 1800))
SUNSET_EPOCH=$(($(date -d "$SUNSET" +%s) + 1800))
On 12/12/2024 12:43, DrStevenStrange wrote:
how can I amend the script so it starts 30 minutes BEFORE sunrise and
stops 30 Minutes after?
Why not just ask the AI goonbot to do that?
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 67:02:28 |
Calls: | 192 |
Calls today: | 1 |
Files: | 5,422 |
Messages: | 223,898 |