# Activity ScheduleToCloseTimeout Capped by WorkflowTaskTimeout — How to Choose Correct Timeout for Polling Activities?

**URL:** <https://community.temporal.io/t/activity-scheduletoclosetimeout-capped-by-workflowtasktimeout-how-to-choose-correct-timeout-for-polling-activities/18723>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [December 3, 2025, 5:17am UTC](https://community.temporal.io/t/activity-scheduletoclosetimeout-capped-by-workflowtasktimeout-how-to-choose-correct-timeout-for-polling-activities/18723 "2025-12-03T05:17:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhinav\_Verma](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/abhinav_verma/32/4887_2.png) [@Abhinav\_Verma](https://community.temporal.io/u/Abhinav_Verma)\
**Post date:** [December 3, 2025, 5:17am UTC](https://community.temporal.io/t/activity-scheduletoclosetimeout-capped-by-workflowtasktimeout-how-to-choose-correct-timeout-for-polling-activities/18723/1 "2025-12-03T05:17:13Z")

</div>

We introduced a new polling activity and explicitly set a large `ScheduleToCloseTimeout` (e.g., 1500 minutes), but the Temporal UI kept showing a 30-minute timeout and the activity is getting failed at first try only. Our workflow configuration was the cause: `WorkflowTaskTimeout` and `WorkflowExecutionTimeout` (30 minutes). Because the workflow task timeout acts as an upper bound on activity timeouts, Temporal capped the activity’s `ScheduleToCloseTimeout` at 30 minutes, ignoring the value we configured.

Given that this activity polls until the workflow times out—and our production `WorkflowExecutionTimeout` is much higher—what is the recommended way to choose an appropriate `ScheduleToCloseTimeout` for long-running polling activities? Should it align with the workflow execution timeout, or is there a better pattern for determining the ideal value?

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [December 3, 2025, 4:47pm UTC](https://community.temporal.io/t/activity-scheduletoclosetimeout-capped-by-workflowtasktimeout-how-to-choose-correct-timeout-for-polling-activities/18723/2 "2025-12-03T16:47:56Z")

</div>

> Because the workflow task timeout acts as an upper bound on activity timeouts

This is incorrect. Workflow task timeout is completely unrelated to activity timeouts. WorkflowExecutionTimeout is the maximum time a workflow is allowed to execute including all retries. So it indeed capped the activity execution time. We recommend. not setting wokflow execution timeout at all.

---

<div class="post-metadata">

**Author:** ![Abhinav\_Verma](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/abhinav_verma/32/4887_2.png) [@Abhinav\_Verma](https://community.temporal.io/u/Abhinav_Verma)\
**Post date:** [December 6, 2025, 6:07am UTC](https://community.temporal.io/t/activity-scheduletoclosetimeout-capped-by-workflowtasktimeout-how-to-choose-correct-timeout-for-polling-activities/18723/3 "2025-12-06T06:07:21Z")

</div>

Thanks @maxim . We were not aware of this recommendation of not setting wokflow execution timeout at all by Temporal team.
