[SOLVED] My rules are not working - Beginner

Hi
i’m new to openhab and have been playing around with programing some virtual items and rules for them, before i get all my IOT devices.

the problem is I have created some virtual items as scenes, and made some rules for them. but it seems to me that the rules are not running.
or at least they are not doing anything.

my rules are in the rules folder and the file is called RULES.rules, do i need to tell openhab to load that file ?
does it have any effect on this file that i am running some rules on " Rule Engine (Experimental)" ?
or is something wrong with my code ?

rule "Sunset Rule"
    when
        Channel 'astro:sun:local:set#event' triggered END
    then
    if( VirtualItem.state==ON ) {
    VirtualItem4.sendCommand(ON)
        //kveikir á deigi
        }
    end

    rule "Sunrise Rule"
    when
        Channel 'astro:sun:local:rise#event' triggered END
    then
    if( VirtualItem.state==ON ) {
        VirtualItem5.sendCommand(ON)
        //kveikir á kvöldi
    }
    end
end
rule "Night Rule"
       when
      Time cron "0 0 0 ? ? MON,TUE,WED,THU,FRI *" or

      // Kveikir á nótt

      Time cron "0 0 1 ? ? SAT,SUN *"
   then
      VirtualItem2.sendCommand(ON)
      end
end
  1. You have two times the same rule “Sunrise Rule”. Each rule must be unic.
  2. The Structure is: rule, when, then, end. You have to many “end” in your code
  3. Each time you edit this file, the rules load immediately at openhab, you must do nothing.

After edit rules, please take a look on the logfiles, then you will see if you have some errors on your scripts: https://www.openhab.org/docs/administration/logging.html

As mentioned above you have more end’s than you need.

Both of your Time cron expressions are incorrect, see this link to assist with the correct format.
https://www.freeformatter.com/cron-expression-generator-quartz.html

Thanks for the help