# Cronplus AGAIN: System Time Change Detected

**URL:** https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702
**Category:** General
**Created:** [17 January 2025 17:13 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702 "2025-01-17T17:13:58Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![malys](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/malys/32/79955_2.png) [@malys](https://discourse.nodered.org/u/malys)
#### Post date: [17 January 2025 17:13 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/1 "2025-01-17T17:13:58Z")

</div>

Many times, my system is very slow on startup and logs are filled with this message:  
"System Time Change Detected - refreshing schedules! If the system time was not changed then this typically occurs due to blocking code elsewhere in your application"  
RP time is synchronized (NTP) but I think that it's not the origin of the problem.  
To my mind, it's a lock.  
Currently, Nodered hosts many flows (backend, dashboard) with different plugins.  
My point is : what are the best practices to:

- EASILY detect lock (please don't answer `disable one by one ....̀
- monitor memory usage, lock ....
- make nodered platform easily observable (which flow consumes RAM, which plugin)
- make plaform with many flows stable on long term journey

I have already use nodejs tools for to rack memory usage but I wisk something more efficient for NR platform

System:  
RP3b  
NR 4.0.8  
node-red-contrib-cron-plus 2.1.0

Many thanks

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [17 January 2025 20:13 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/2 "2025-01-17T20:13:43Z")

</div>

> [@malys](#):
>
> EASILY detect lock (please don't answer `disable one by one ....̀

Divide and conquer. Disable half, then half of half etc.

But the first place I'd look is for `for` loops in function nodes, and flows that loop back on themselves, and large data processing (e.g. image data, audio data, video data) and lastly and large database queries (the node may be written badly and doing blocking requests instead of async)

---

<div class="post-metadata">

### Author: ![malys](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/malys/32/79955_2.png) [@malys](https://discourse.nodered.org/u/malys)
#### Post date: [18 January 2025 16:45 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/3 "2025-01-18T16:45:36Z")

</div>

No magic tool.  
It will be a long journey to understand what is happening

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [18 January 2025 16:59 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/4 "2025-01-18T16:59:09Z")

</div>

You could try switching logging to "trace" in the [settings file](https://nodered.org/docs/user-guide/runtime/configuration). I think that shows when each node is executed. In theory, the stuff just before the warning should be responsible.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [18 January 2025 20:08 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/5 "2025-01-18T20:08:17Z")

</div>

After it is up and running does it still use a lot of CPU?

---

<div class="post-metadata">

### Author: ![malys](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/malys/32/79955_2.png) [@malys](https://discourse.nodered.org/u/malys)
#### Post date: [19 January 2025 17:08 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/6 "2025-01-19T17:08:31Z")

</div>

step by step i have identified the problem

see [bug report](https://github.com/naimo84/node-red-contrib-ical-events/issues/163) in node-red-contrib-ical-events

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [19 January 2025 21:45 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/7 "2025-01-19T21:45:37Z")

</div>

Note that the Cron node is simply an innocent messenger in this. It is noticing that something is locked and warning you about it.

---

<div class="post-metadata">

### Author: ![malys](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/malys/32/79955_2.png) [@malys](https://discourse.nodered.org/u/malys)
#### Post date: [21 January 2025 15:28 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/8 "2025-01-21T15:28:07Z")

</div>

# [System Time Change Detected](https://github.com/Steve-Mcl/node-red-contrib-cron-plus/issues/53)

> in v2, the env var `CRONPLUS_MAX_CLOCK_DIFF` can be set to a higher ms value. Default is 5000.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [21 January 2025 18:22 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/9 "2025-01-21T18:22:44Z")

</div>

Adjusting the detection parameter is not a solution, it is simply masking an issue with some CPU hogging code.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [4 February 2025 18:22 UTC](https://discourse.nodered.org/t/cronplus-again-system-time-change-detected/94702/10 "2025-02-04T18:22:53Z")

</div>

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