# Need a good after hours snippet example?

**URL:** <https://discuss.rapid7.com/t/need-a-good-after-hours-snippet-example/49843>\
**Category:** Workflows\
**Created:** [April 3, 2025, 1:42pm UTC](https://discuss.rapid7.com/t/need-a-good-after-hours-snippet-example/49843 "2025-04-03T13:42:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilovesoar](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/ilovesoar/32/358_2.png) [@ilovesoar](https://discuss.rapid7.com/u/ilovesoar)\
**Post date:** [April 3, 2025, 1:42pm UTC](https://discuss.rapid7.com/t/need-a-good-after-hours-snippet-example/49843/1 "2025-04-03T13:42:15Z")

</div>

I am trying to build a snippet that checks current time and sees if it is before 8 AM and after 5 PM.

Keep getting this ’ “13” is not an object"…

def run(params={}):\n  
print(params.get(“{{[“Action - 1”].[datetime]}}”)  
return {}

---

<div class="post-metadata">

**Author:** ![Eric-Wilson](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/eric-wilson/32/2531_2.png) [@Eric-Wilson](https://discuss.rapid7.com/u/Eric-Wilson)\
**Post date:** [April 3, 2025, 2:00pm UTC](https://discuss.rapid7.com/t/need-a-good-after-hours-snippet-example/49843/2 "2025-04-03T14:00:27Z")

</div>

Have you look at the following workflow? This does what you want without using python. That being said, if you want to use python the earlier version of the workflow also has an example of how to use it correctly.

> **[Rapid7 Extensions](https://extensions.rapid7.com/extension/Out-Of-Office-AutoResponse-User-Containment)**
>
> Discover Extensions for the Rapid7 Insight Platform
