Trigger script on sunset and -rise
Saving energy and increase life of the IR leds do I want to turn the IR leds off during the day. I could just pull some list of the internet and run a cron script during certain hours of the day to see if it fit the correct time (so to speak).
But there is a script https://sourceforge.net/projects/sunwait4windows/ that does check these values for you.
So when doing a quick run down with: ./sunwait wait debug
I get this
Code: Select all
Debug: argv: >wait< Debug: argv: >debug< Debug: All output to use local timezone (nogmt). Debug: Now utcTm: Sat Feb 16 13:55:12 2019 GMT Debug: Now localTm: Sat Feb 16 14:55:12 2019 CET Debug: Now UTC bias (add to GMT to get CET) hours: 1.000000 Debug: UTC Bias (hours): 1.000000 Debug: Now: Days since 2000: 6986 Debug: Target year set to: 119 Debug: Target mon set to: 1 Debug: Target mday set to: 16 Debug: Target utcTm: Sat Feb 16 00:00:00 2019 GMT Debug: Target localTm: Sat Feb 16 01:00:00 2019 CET Debug: Target UTC bias (add to GMT to get CET) hours: 1.000000 Debug: Target: Days since 2000: 6986 Debug: Co-ordinates - Latitude: 52.952308N Debug: Co-ordinates - Longitude: 359.048052E Debug: Twilight - Daylight Debug: User specified offset (hours): 0.000000 Debug: Function selected: Wait Debug: sunriset.cpp: Sun directly south: 12.299710 UTC, Dirunal Arc = 9.850984 hours Debug: sunriset.cpp: Days since 2000: 6985 Debug: sunriset.cpp: Sun directly south: 12.299120 UTC, Dirunal Arc = 9.916388 hours Debug: sunriset.cpp: Days since 2000: 6986 Debug: sunriset.cpp: Sun directly south: 12.298327 UTC, Dirunal Arc = 9.982130 hours Debug: sunriset.cpp: Days since 2000: 6987 Debug: Wait reduced from 12014 to 10 seconds.
Using this command: ./sunwait list rise
# it will output this
But how do i get a script executed on 08:20?