# New rule language in OH3 ? What to prefer?

**URL:** <https://community.openhab.org/t/new-rule-language-in-oh3-what-to-prefer/128234>\
**Category:** Scripts & Rules\
**Created:** [November 2, 2021, 9:31am UTC](https://community.openhab.org/t/new-rule-language-in-oh3-what-to-prefer/128234 "2021-11-02T09:31:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jimtng](https://community.openhab.org/user_avatar/community.openhab.org/jimtng/32/98543_2.png) [@jimtng](https://community.openhab.org/u/jimtng)\
**Post date:** [November 2, 2021, 1:51pm UTC](https://community.openhab.org/t/new-rule-language-in-oh3-what-to-prefer/128234/2 "2021-11-02T13:51:41Z")

</div>

Please check out [JRuby OpenHAB Rules System](https://community.openhab.org/t/jruby-openhab-rules-system/110598)  
It is: **simple, elegant, easy to read, very powerful, just plain awesome**

I started out using Rules DSL, then Jython, then when I found JRuby, I’m in love. Prior to finding it, I knew nothing about Ruby programming. It’s easy to learn if you have any programming background.

> [@Topsurfer](#):
>
> ```auto
> createTimer(now.plusSeconds(30), [|
> if (Speedtest_Summary.state == NULL || Speedtest_Summary.state == "") Speedtest_Summary.postUpdate("unknown")
> ])
> 
> ```

In JRuby that code would look like this:

```ruby
after(30.seconds) do
  Speedtest_Summary.update("unknown") if !Speedtest_Summary.state? || Speedtest_Summary.empty?
end

```

---

_[View the full topic](https://community.openhab.org/t/new-rule-language-in-oh3-what-to-prefer/128234)._
