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) Astro-function an bestimmten Tagen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    (gelöst) Astro-function an bestimmten Tagen

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

      Hallo zusammen,

      gem. Astro-function gib's die Funktion

      schedule({astro: "sunset", shift: 10}, function () {
          log("10 minutes after sunset!");
      });
      

      gibt's auch die Möglichkeit diesen nur an bestimmten Tagen, z.B. am Montag und Mittwoch, auszuführen?

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

        @ice987 anschließend prüfen ob Mo oder Mi ist, dann erst das gewünschte ausführen

        ice987 1 Reply Last reply Reply Quote 0
        • ice987
          ice987 @Homoran last edited by

          @homoran
          so mache ich es aktuell, geht dies ggf. auch dierkt?

          hab' gesehen dass es ggf noch parameter geben könnte (https://forum.iobroker.net/topic/62066/probleme-bei-astro-tag-und-nacht?_=1685378042927) :

          schedule('{"time":{"start":"sunset"},"period":{"days":1},"valid":{"from":"13.01.2023","to":""}}', async function () {
          
          ice987 1 Reply Last reply Reply Quote 0
          • ice987
            ice987 @ice987 last edited by

            @ice987

            Lösung:

            schedule1 = schedule('{"time":{"exactTime":true,"start":"sunset"},"period":{"weeks":1,"dows":"[0,1,2,3,4,5,6]"}}', async function () {
            

            dows sind die Wochentage

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

            Support us

            ioBroker
            Community Adapters
            Donate

            605
            Online

            31.7k
            Users

            79.8k
            Topics

            1.3m
            Posts

            2
            4
            138
            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