I'm looking for a Linux program that can give me an on/off answer based on time. I'm thinking of something that can read simple rules like these
mon-wed 18:30-21:15
thu 17:30-21:15
fri 14:00-17:00
2016.10.10 10:00-13:00
and give me a nonzero exit status when the current time is not in any of the ranges. Is there a program that does this?
Background: I want to keep open an electric door lock during certain times of the day. I started to program the functionality when I thought "somebody must have done this!" I can't seem to find anything though. A library with matching functionality would be welcome too.