I've not seen a common approach. Use the word "timer" instead of "scheduler" gets me a few more useful hits. My two approaches have been; 1. keep time using the microcontroller's main oscillator, if it can be kept running, and maintain countdowns for repeating events, or; 2. keep time using an external RTC, with a minute change detector in software, and maintain countdowns from that. The countdowns decrement, and when they reach zero the event is started and the countdown is reloaded. Should you wish to sleep the micro and have it woken from the RTC, the prepare-to-sleep logic is a search for the smallest countdown. I don't like writing code for hours, minutes and seconds. ;-) On Fri, May 27, 2016 at 08:38:06AM +0300, KPL wrote: > Hi, >=20 > I'm trying to implement my own timer/scheduler, for remote garden > irrigation use. I have had several earlier attempts, which had worked, > but with some issues. I'm sure there must be some common approach, as > it should be quite popular thing. >=20 > All I can find using my search terms, is different kind of scheduling > - the one used for multitasking on CPU. Can anyone direct me to some > articles/examples/discussions about simple RTC-based scheduling? Or > the right search terms (I'm not a native english speaker)? >=20 > --=20 > KPL > --=20 > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 James Cameron http://quozl.netrek.org/ --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .