# Pause Timer - Timer only running while worktime hours

**URL:** <https://forum.camunda.io/t/pause-timer-timer-only-running-while-worktime-hours/4293>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [July 20, 2017, 7:57am UTC](https://forum.camunda.io/t/pause-timer-timer-only-running-while-worktime-hours/4293 "2017-07-20T07:57:56Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![StephenOTT](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@StephenOTT](https://forum.camunda.io/u/StephenOTT)\
**Post date:** [December 6, 2017, 9:58pm UTC](https://forum.camunda.io/t/pause-timer-timer-only-running-while-worktime-hours/4293/12 "2017-12-06T21:58:27Z")

</div>

Hey guys as a solution to this problem:

> [@Business Calendar Business Hours/Days Logic - Timers, Gateways, generic logic](https://forum.camunda.io/t/business-calendar-business-hours-days-logic-timers-gateways-generic-logic/5503):
>
> Another scripting example to share: A few forum members have asked about how to calculate dates based on Business Calendars / Business Hours/Days: Example: M-F 8am-5pm are working hours. If something is due “Next Day”, and it’s currently a Friday, it would be due by Monday at 5pm. BUT if Monday is a holiday, then it would be due on Tuesday by 5pm. So how do we calculate this, and how do we do it without having to write a lot of code. How do we determine if the current DateTime is within Busi…

You could use the cron expression to build your timer cycle or you could have a timer that loops into a gateway to check if its currently business hours and execute if it is.

---

_[View the full topic](https://forum.camunda.io/t/pause-timer-timer-only-running-while-worktime-hours/4293)._
