Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. [gelöst] schedule bringt Fehler

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] schedule bringt Fehler

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

      Hallo zusammen,

      ich habe mir ein Script zurecht gebastelt, was einen Ordner auf das Vorhandensein einer bestimmten
      Datei prüfen soll.

      Das Script funktioniert, aber ich bekomme den schedule nicht richtig eingebunden.

      Kann mir bitte jemand helfen?

      Danke

      const fs = require("fs");
      
      const path = "/opt/iobroker/test/test.txt";
      
      if (fs.existsSync(path)) {
        // path exists
        console.log("exists:", path);
        setState("0_userdata.0.Test.datei", true);
      } else {
        console.log("NOT exist:", path);
        setState("0_userdata.0.Test.datei", false);
      }
      
      schedule('* * * * *');
      
      

      Fehlerlog

      schedule callback missing
      
      Asgothian 1 Reply Last reply Reply Quote 0
      • Asgothian
        Asgothian Developer @falke69 last edited by

        @falke69 sagte in schedule bringt Fehler:

        Kann mir bitte jemand helfen?

        Bitte Lesen:
        https://www.iobroker.net/docu/index-81.htm?page_id=5809&lang=de

        Runter scrollen bis zur Erklärung von "schedule"

        A.

        falke69 1 Reply Last reply Reply Quote 0
        • falke69
          falke69 @Asgothian last edited by

          @asgothian

          Danke!
          Das hatte ich leider bei meiner Suche nicht gefunden.

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

          Support us

          ioBroker
          Community Adapters
          Donate

          475
          Online

          31.8k
          Users

          80.0k
          Topics

          1.3m
          Posts

          javascript
          2
          3
          107
          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