# \[IGN-5824\]Ignition - Gateway shelf Alarm script

**URL:** <https://forum.inductiveautomation.com/t/ign-5824-ignition-gateway-shelf-alarm-script/69262>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [February 1, 2023, 9:11am UTC](https://forum.inductiveautomation.com/t/ign-5824-ignition-gateway-shelf-alarm-script/69262 "2023-02-01T09:11:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 1, 2023, 4:41pm UTC](https://forum.inductiveautomation.com/t/ign-5824-ignition-gateway-shelf-alarm-script/69262/3 "2023-02-01T16:41:41Z")

</div>

The `system.alarm.shelve` implementation is hardcoded to use `gateway-script` as the user ID, likely because it long predates Perspective, and thus there would never be multiple users interacting with the gateway. We can and will amend that to allow for passing more information in, _but_, in the meantime, you can work around it fairly easy.  
You'll need to get a `GatewayContext` - there's examples floating around the forums on how to do that, or you can use [Ignition Extensions](https://forum.inductiveautomation.com/t/ignition-extensions-convenience-utilities-for-advanced-users/64615), my unofficial set of useful scripting modules. Once you _have_ a context, all you have to do is:

```python
from com.inductiveautomation.ignition.common import QualifiedPath

def shelve(paths, timeout, userName):
    paths = [QualifiedPath.parse(stringPath) for stringPath in paths]
    user = QualifiedPath.Builder().setUser(userName).build()
    gwContext = # obtain a gateway context
    gwContext.getAlarmManager().shelve(paths, timeout, user);

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/ign-5824-ignition-gateway-shelf-alarm-script/69262)._
