# Regarding the configuration of the UserTask due date

**URL:** <https://forum.camunda.io/t/regarding-the-configuration-of-the-usertask-due-date/64474>\
**Category:** Camunda 8 Topics\
**Tags:** process-engine\
**Created:** [September 8, 2025, 5:51am UTC](https://forum.camunda.io/t/regarding-the-configuration-of-the-usertask-due-date/64474 "2025-09-08T05:51:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesxql](https://forum.camunda.io/user_avatar/forum.camunda.io/jamesxql/32/32426_2.png) [@jamesxql](https://forum.camunda.io/u/jamesxql)\
**Post date:** [September 8, 2025, 5:51am UTC](https://forum.camunda.io/t/regarding-the-configuration-of-the-usertask-due-date/64474/1 "2025-09-08T05:51:23Z")

</div>

I need to set a dueDate for the UserTask of the process model. I want to set this time to 24 hours after the task is successfully created. How should I configure it?

Does the process engine provide a method to retrieve the creation time of a UserTask?

---

<div class="post-metadata">

**Author:** ![zee-bot](https://forum.camunda.io/user_avatar/forum.camunda.io/zee-bot/32/32886_2.png) [@zee-bot](https://forum.camunda.io/u/zee-bot)\
**Post date:** [September 8, 2025, 5:52am UTC](https://forum.camunda.io/t/regarding-the-configuration-of-the-usertask-due-date/64474/2 "2025-09-08T05:52:13Z")

</div>

Hi there! 👋

Great question about configuring UserTask due dates! I can help you with both parts of your question.

## Setting Due Date to 24 Hours After Task Creation

You can configure a UserTask’s due date to be 24 hours after its creation using the `zeebe:taskSchedule` extension element in your BPMN model. Here’s how:

**In your BPMN XML:**

```xml
<bpmn:userTask id="myUserTask" name="My User Task">
  <bpmn:extensionElements>
    <zeebe:taskSchedule dueDate="= now() + duration('P1D')" />
    <zeebe:userTask />
  </bpmn:extensionElements>
</bpmn:userTask>

```

**In Camunda Modeler:**

1. Select your UserTask
2. In the Properties Panel, find the “Due date” field under the scheduling section
3. Enter the expression: `= now() + duration('P1D')`

**How it works:**

- `now()` returns the current date and time when the user task is activated (creation time)
- `duration('P1D')` represents 1 day (24 hours) in ISO 8601 duration format
- The expression calculates the due date as exactly 24 hours after task creation

## Retrieving UserTask Creation Time

Yes, the process engine does provide methods to retrieve the creation time of a UserTask through the Tasklist API:

**REST API:**

```bash
GET /v1/tasks/{taskId}

```

The response includes a `creationDate` field:

```json
{
  "id": "string",
  "name": "string", 
  "creationDate": "2023-03-29T20:08:07.171Z",
  ...
}

```

**GraphQL API:**

```graphql
{
  task(id: "your-task-id") {
    id
    creationTime
    ...
  }
}

```

## References

- [User task scheduling documentation](https://docs.camunda.io/docs/components/modeler/bpmn/user-tasks/#scheduling)
- [Timer expressions and ISO 8601 durations](https://docs.camunda.io/docs/components/modeler/bpmn/timer-events/#timers)
- [Task object reference (GraphQL)](https://docs.camunda.io/docs/apis-tools/tasklist-api/objects/task/)
- [TaskResponse schema (REST)](https://docs.camunda.io/docs/apis-tools/tasklist-api-rest/schemas/responses/task-response/)

This approach ensures your due date is always calculated relative to the actual creation time of the user task. Let me know if you need any clarification!

---

<div class="post-metadata">

**Author:** ![zee-bot](https://forum.camunda.io/user_avatar/forum.camunda.io/zee-bot/32/32886_2.png) [@zee-bot](https://forum.camunda.io/u/zee-bot)\
**Post date:** [September 8, 2025, 5:55am UTC](https://forum.camunda.io/t/regarding-the-configuration-of-the-usertask-due-date/64474/3 "2025-09-08T05:55:28Z")

</div>

Perfect! I’m glad I could help you configure UserTask due dates in Camunda 8.

**Summary of the solution:**

- Use `zeebe:taskSchedule` with the expression `= now() + duration('P1D')` to set due dates 24 hours after task creation
- Retrieve task creation time via Tasklist API using `creationDate` (REST) or `creationTime` (GraphQL) fields
- Configure this easily in Camunda Modeler’s Properties Panel or directly in BPMN XML

The `now()` function ensures the due date is always calculated from the actual task creation time, giving you the precise 24-hour window you need.

Happy modeling! 🚀

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [September 15, 2025, 5:56am UTC](https://forum.camunda.io/t/regarding-the-configuration-of-the-usertask-due-date/64474/4 "2025-09-15T05:56:11Z")

</div>

Closed on September 15, 2025, 5:56am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
