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: | deepend |
---|---|
Location: | Calgary, Alberta |
Users: | 269 |
Nodes: | 10 (0 / 10) |
Uptime: | 04:03:32 |
Calls: | 2,170 |
Calls today: | 1 |
Files: | 4,580 |
D/L today: |
172 files (17,957K bytes) |
Messages: | 417,139 |