Programming Arduino for time of day scheduling

Looking for a program that can turn on/off etherent relays from Andriod or web based interface
must be able to use a calendar scheduler, i have seen many applications that allow real time ON/OFF control of relays, but I have not yet seen a ON/OFF control that can be set for weekly events
WE are a company that builds/designs remote relay activation in schools to handle their class change notification, however most schools have preset weekly schedules so we need to program the Arduino to execute a weekly schedule.

Many Thanks
Dan

The Arduino does not have a built in real-time-clock but you could buy a shield giving the calendar functionality you require.

must be able to use a calendar scheduler

Can you explain in more detail what you mean by this?

Agree with Radman's advise. You should at least buy a Real Time Clock.
I like - Overview | Adafruit Data Logger Shield | Adafruit Learning System - because it allows you to log all actions done.
And 2nd, it allows you to put the schedule on disk in a txt file so it is available after a unexpected reboot (those happen).

You might find the TimeAlarms library useful

do any people in this form undertake paid programming?

Dan

See the Gigs and Collaborations forum.

Pete

You don't need a Real Time Clock if you have ethernet, and it's connected to the web, you can get the time from the web. Take a look at the "TimeNTP" example sketch that comes in the Time library.

Once you have the current time, you can just make an if statement. Something like this:

time_t t = now()
if (weekday(t) == 0 && hour(t) == 10 && minute(t) == 0 && second(t) == 0) {
   do something;
}

This would trigger on Sunday at 10:00AM

Mention has been made of using a library and also getting the time over the internet.

The OP seems to want something for use in schools. I had discounted using the software library because I thought there might be a drift over the course of a year (any idea how much this would be?) and I thought schools might not like having to adjust the clock. Connecting to the internet also, to me, seems to add a layer of complication that schools might not want to deal with e.g. firewall inadvertently cutting connection, extra wiring or a wirless connection etc.

Yet another option might be picking up a radio time broadcast, but for that you need reception of a good radio signal.

All in all a real-time-clock shield seemed, to me, to be a clean self-contained solution.

Strange, I just spent the past 30 hours programming just such a system which has a web based GUI to program the schedules and choices of days they are to be triggered....