sunwait icon indicating copy to clipboard operation
sunwait copied to clipboard

Sunwait usage question

Open universe241981 opened this issue 5 years ago • 1 comments

Hi, I browsed around through the internet about how to use sunwait with cron. I followed one of the source and make the sunwait as well as cp the made sunwait into usr/local/bin

  1. The sunwait -p seem no longer work?
  2. The sunwait report [latitude] [longitude] is woking.

In case of I want to edit the crontab as below for everyday at 5AM, wait until astronomical twilight begin, then stop my overnight running system via http, the crontab should be as below?

00 05 * * * /usr/local/bin/sunwait wait astronomical rise [latitude] [longitude] ; curl -X POST http://<ip>/api/stop

Please advise. Thank you very much.

universe241981 avatar Apr 12 '19 03:04 universe241981

I understand that sunwait -p used to be the way with older versions worked but now it's called the 'poll' option.

Example cron task that I use to restart a camera motion daemon at sunrise/sunset on a Raspberry Pi 4:

@reboot /home/pi/scripts/pi_sunwait wait rise 51.360258N -0.147890E; sudo service motion restart @reboot /home/pi/scripts/pi_sunwait wait set 51.360258N -0.147890E; sudo service motion restart

Johnny-quattro avatar Oct 03 '20 13:10 Johnny-quattro