5 minutes cron not working
Closed this issue · 1 comments
renejanssen1 commented
hi i have an Wemos d1 mini v.3.00
I've made a cron to run every 5 minutes.
So i expected output times like
9:45:00
9:50:00
9:55:00
but i get
10:46:44
10:51:44
10:56:45
#include <time.h> // time() ctime()
#ifdef ESP8266
#include <sys/time.h> // struct timeval
#endif
#include "CronAlarms.h"
void setup() {
Serial.begin(115200);
while (!Serial) ; // wait for Arduino Serial Monitor
Serial.println("Starting setup...");
Cron.create("0 */5 * * * *", Repeats, false);
Serial.println("Ending setup...");
}
void loop() {
delay(1000);// do other things... like waiting one second between clock display
}
void Repeats() {
postData();
}
postData() is sending something to my server.
Thanks already René
renejanssen1 commented
Already solved, it needs a ntp server to get the correct current time.