# How to run scene from rule

**URL:** <https://community.openhab.org/t/how-to-run-scene-from-rule/154909>\
**Category:** Scripts & Rules\
**Created:** [March 25, 2024, 12:34pm UTC](https://community.openhab.org/t/how-to-run-scene-from-rule/154909 "2024-03-25T12:34:48Z")\
**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:** [March 25, 2024, 1:23pm UTC](https://community.openhab.org/t/how-to-run-scene-from-rule/154909/2 "2024-03-25T13:23:14Z")

</div>

Yes absolutely.

In jruby:  
[rules[“id”]](https://openhab.github.io/openhab-jruby/main/OpenHAB/Core/Rules/Registry.html#%5B%5D-instance_method) gives you the rule object for the given `id`, which supports the [trigger method](https://openhab.github.io/openhab-jruby/main/OpenHAB/Core/Rules/Rule.html#trigger-instance_method) (aliased as `run`).

```auto
rules["scene_id"].run

```

in jsscripting: [rules - openHAB JS](https://openhab.github.io/openhab-js/rules.html)

```auto
rules.runRule("scene_id")

```

---

_[View the full topic](https://community.openhab.org/t/how-to-run-scene-from-rule/154909)._
