Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. English
    3. Scripting / Logic
    4. JavaScript
    5. problem during boot with schedule command in the script

    NEWS

    • Amazon Alexa - ioBroker Skill läuft aus ?

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    problem during boot with schedule command in the script

    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hschief last edited by

      Dear Forum,

      i face some problems during system boot. There are some scripts with time schedules. For testing I create the following:

      function Test1() {
          log('In Function','error');
          setState('0_userdata.0.Allgemein.TestBoot', 'test', false);
      };
      
      log('Script Test1 aufgerufen','error');
      
      schedule("*/10 * * * * *", Test1 )
      

      During normal operation it logs every 10s: "In Function" - as expected.

      During boot-up the following happend - it wrote logs to the log file more than 1000 times in a minute.:
      2024-04-16 14:25:31.573 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function
      2024-04-16 14:25:31.580 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function
      2024-04-16 14:25:31.591 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function
      2024-04-16 14:25:31.598 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function
      2024-04-16 14:25:31.610 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function
      2024-04-16 14:25:31.622 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function
      2024-04-16 14:25:31.634 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function
      2024-04-16 14:25:31.642 - error: javascript.0 (726) script.js.Technik.Heizung.BootTestScript: In Function

      This happens in my installation for any scripts which such a schedule.
      In case i go to the shell and i use the commands: iobroker stop and afterwards iobroker start .. the system runs as expected without scheduling this 1000 times.

      In case I do a fresh boot, without starting the iobroker and then starting the iobroker from the console, I have the same problem. After I do iobroker stop/start all is fine again.

      I run:
      js: 5.0.19
      node: v18.17.1
      javascript: v7.8.0

      Any ideas? Anybody able to reproduce this before I create a bug report?

      DJMarc75 1 Reply Last reply Reply Quote 0
      • DJMarc75
        DJMarc75 @hschief last edited by

        @hschief i don´t think that a double post in an other language is helpful to solve you´re Problem 😉

        H 1 Reply Last reply Reply Quote 0
        • arteck
          arteck Developer Most Active last edited by

          why .....

          https://forum.iobroker.net/topic/74128/maximum-of-1000-setstate-during-boot?_=1713335509270

          1 Reply Last reply Reply Quote 0
          • H
            hschief @DJMarc75 last edited by

            @djmarc75 easy to explain.... more english speaker the German speaker ... to reach a bigger audience. Thx. for the hint ... doesn't help anything for the question

            Homoran 1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @hschief last edited by

              @hschief sagte in problem during boot with schedule command in the script:

              .... more english speaker the German speaker

              🤣

              Screenshot_20240417-125840_Firefox.jpg
              das sind die Installationen und im forum istcdie Luft noch viel dünner

              1 Reply Last reply Reply Quote 1
              • First post
                Last post

              Support us

              ioBroker
              Community Adapters
              Donate

              1.1k
              Online

              32.2k
              Users

              80.9k
              Topics

              1.3m
              Posts

              4
              5
              506
              Loading More Posts
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes
              Reply
              • Reply as topic
              Log in to reply
              Community
              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
              The ioBroker Community 2014-2023
              logo