I have a piece of code which acts as a server and is switching different valves and other actuators. The commands for switching those actuators are being received via sockets from clients running on Android devices. Now Id like to add a module to my server which would allow me to schedule an calendar dependant switching of those actuators. I wonder how to do that. Right now I am thinking of time.h of course, as the very basic. Then I could imagine to have a stucture which holds the programmable events (time, date and what to trigger) and a task which would endlessly compare the time/date to the actual time.. However I am not really sure if that is the right approach. Please hint me in the right direction.
Options include: