---
title: "How to force a snooze for a set period of time as a default"
description: "Forcing a snooze for a set period ensures specific users can only snooze items for a defined time. Creating a custom command and role restricts snooze options to enforce this default period."
url: "https://docs.itrsgroup.com/docs/faq/geneos/33696801157149-geneos-how-to-force-a-snooze-for-a-set-period-of-time-as-a-default/index.html"
---
## Problem

I am aware of the various snooze options but I want to ensure that specific users can only snooze an item for a set period of time (like 15 hours)

### Solution

A custom command will need to be created.

![Geneos - How to force a snooze for a set period of time as a default](https://docscdn.itrsgroup.com/faq/images/geneos/33696801157149-33696801153565-image.png)

```
<command name="For Set Time Period - 15 hours">
    <targets>
        <target>//*</target>
    </targets>
    <task>
        <commands>
            <commandRef>
                <internalCommand>
                    <name>/SNOOZE:time</name>
                </internalCommand>
                <stopOnError>true</stopOnError>
            </commandRef>
        </commands>
        <args>
            <arg>
                <targetArgs>
                    <targetArg>
                        <commandNumber>1</commandNumber>
                        <argNumber>4</argNumber>
                    </targetArg>
                </targetArgs>
                <userInput>
                    <description>Hours</description>
                    <options>
                        <option>
                            <label>15 Hours</label>
                            <value>15</value>
                        </option>
                    </options>
                </userInput>
            </arg>
            <arg>
                <targetArgs>
                    <targetArg>
                        <commandNumber>1</commandNumber>
                        <argNumber>5</argNumber>
                    </targetArg>
                </targetArgs>
                <static>3600</static>
            </arg>
        </args>
        <silent>true</silent>
    </task>
</command>
```

Typically when you run the command you should get a dialog box similar to the below

![Geneos - How to force a snooze for a set period of time as a default](https://docscdn.itrsgroup.com/faq/images/geneos/33696801157149-inline-1-image.png)

The Gateway Snooze-Data plugin will display details of the snooze

![Geneos - How to force a snooze for a set period of time as a default](https://docscdn.itrsgroup.com/faq/images/geneos/33696801157149-inline-2-image.png)

If you want to override snooze commands so specific users can only run the above command and no other commands a custom role needs to be created.

Example

![Geneos - How to force a snooze for a set period of time as a default](https://docscdn.itrsgroup.com/faq/images/geneos/33696801157149-inline-3-image.png)

```
<role name="Snooze Specific">
    <permissions>
        <permission>
            <command>
                <targets>
                    <target>/*</target>
                </targets>
                <names>
                    <name>For Set Time Period - 15 hours</name>
                </names>
                <access>execute</access>
            </command>
        </permission>
        <permission>
            <command>
                <targets>
                    <target>/*</target>
                </targets>
                <names>
                    <name>/SNOOZE:info</name>
                    <name>/SNOOZE:severity*</name>
                    <name>/SNOOZE:date*</name>
                    <name>/SNOOZE:time*</name>
                    <name>/SNOOZE:until*</name>
                    <name>/SNOOZE:unsnooze*</name>
                </names>
                <access>none</access>
            </command>
        </permission>
    </permissions>
    <roleProperties>
        <roleProperty>Snooze Specific</roleProperty>
    </roleProperties>
    <users>
        <user ref="test3"></user>
    </users>
</role>
```

So when you right click your target you should only see the command you have custom created as a right click option.

![Geneos - How to force a snooze for a set period of time as a default](https://docscdn.itrsgroup.com/faq/images/geneos/33696801157149-inline-4-image.png)

## Related Articles

<https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_commands_tr/index.html#Heading-snooze-commands>


