How to run specific code to connect to NTP in intervals like 2min etc

hello all I'm using ESP8266TimeAlarms library to set schedule for my esp-12 f like activate relay at 2pm, 4pm using NTP .It's getting sync to NTP server but sometime have seen it doesn't sync and display the default date/time of esp-12f till a reset is made causing error. Any way to sync in specific intervals to the NTP server and avoid the
configTime(0, 0, "");
//Europe/Stockholm": "ST-5:30(Indian Standard Time)"
//Get JSON of Olson to TZ string using this code
setenv("TZ", "UTC-05:30", 1);

[Mod edit, link to sanitised to remove Facebook tracking link]

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.