Q: Scheduler to switch things on/off based on weekday, date and time of day 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.

A: Since I couldn't find anything and couldn't get an answer here either, I resigned to write a Python script that understands the format I used in my question.
The script is run from Cron:
* * * * * root /usr/bin/isittime /etc/opening-hours && /sbin/open-lock || /sbin/close-lock

