Sunwait calculates sunrise or sunset times with civil, nautical, astronomical, and custom twilights. It is intended for use in home automation with Windows Task Scheduler or cron. The program can wait from invocation until the event specified on the command line occurs or it can return immediately indicating if it is day or night.