-->
Page 1 of 1

Daily Task fire in ESP8266, while loop is reading inputs

PostPosted: Mon Dec 12, 2022 2:39 pm
by Stewart
I'm trying to gather a bit of intel about scheduling a daily event using an ESP8266 and maybe ESPDailyTask.h.

I'm not finding any examples of using ESPDailyTask.h without the sleep mode, and with an active loop.

Can the
Code: Select alldailyTask.sleep1Day()
and
Code: Select alldailyTask.backToSleep()
simply be omitted to run loop code?

Re: Daily Task fire in ESP8266, while loop is reading inputs

PostPosted: Tue Dec 13, 2022 7:38 am
by btidey
The ESPDailyTask library is all about deep sleep, i.e. waking up once per day, performing the task and then shutting down again.

If you want to schedule a task once per day then you should look at using one of the cron type libraries. These give the equivalent of Unix cron functionality giving very flexible scheduling including once per day.

e.g. https://github.com/Martin-Laclaustra/CronAlarms

Re: Daily Task fire in ESP8266, while loop is reading inputs

PostPosted: Tue Dec 13, 2022 9:30 am
by Stewart
Thanks btidey.