Cronjob stops working after period of time



  1. My goal is: To have a cronjob fire on an esp8266 every minute reliably.

  2. My actions are: I’ve set up a cronjob on boot of the device:

     mgos_cron_id_t light_timer_cron_id;
     void setup_cron_job()
         // We want a cron job every minute so 0 */1 * * * *
         light_timer_cron_id = mgos_cron_add("0 */1 * * * *", cron_job_minute_cb, NULL);
  3. The result I see is: It works for a short time (a couple of minutes to some hours) after this the cronjob no longer fires. I get no errors or logs that inform me why it has stopped.

  4. My expectation & question is: How can I make sure that the cronjob keeps on working, and what can cause the mechanism to fail? Alternatively, can I easily detect this and restart the job?


Could you provide an example to reproduce this issue?
I’m running a few devices with 1 minute cron jobs that work without any problem.