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: | Sarah |
---|---|
Location: | Portland, Oregon |
Users: | 57 |
Nodes: | 16 (0 / 16) |
Uptime: | 19:36:32 |
Calls: | 370 |
Calls today: | 370 |
Files: | 84,190 |
U/L today: |
44 files (5,578M bytes) |
D/L today: |
2,893 files (194M bytes) |
Messages: | 49,941 |
Posted today: | 29 |