I will test with System Thread.
There is a very high probability that the problem has to do with the cloud functions. The reason is because a few days ago, with @ScruffR’s help, I ran the same code overnight without problems.
In checking that code, I realized I had
System Mode (manual).
So I will try again and report.
Thanks.