Specified time in timer definition

Hello,
I want to attach a timer with a specific time to a user task not depending on the task start (day, time,…).
So one task starts at 8:00 am another at 9:00 am and each task should have a timer attached that fires at 6:00 pm.
How can I accomplish this?

Hi @tharo,

Welcome to the community.

You can consider using Event Subprocess with timer start event if the timer should be triggered only once no matter of the task that is in execution at that time.
Also here is a list with all events: BPMN 2.0 Implementation Reference | docs.camunda.org

Best regards,
Yana

Hi @Yana,
thank you for your quick answer.
No matter how, it seems to me that i have to calculate and set the date for the timer.
And here I see the problems. I tried a task listener without success. When the listener starts and queries for my timer, it seems not to be committed yet.
Maybe my approach is completly wrong.

Hi @tharo,

Do I understand correctly that the time duration definition is not suitable for you?
In case you set up a time cycle, you have the option to reschedule it: Timer Events | docs.camunda.org.

Hi @Yana,

Yes you understand me correctly. I think a duration just waist the specified time and fires. I want to set a specific time e.g 18:00 to all timers in all user tasks that are started. To my opinion I have to calculate a datetime and set my timer. Independently when the task starts. If the task starts later than 18:00 the next business day shall be chosen.

Hi @tharo,

What about using a expression? That way you can adjust the timer based on a variable which can pass on process instance start or adjust in a listener.

Hope that helps.

Hi @Yana,

I’m already using an expression that refers a variable.
I also tried adjusting this variable in a task start listener. Unfortunatetly the timer is not affected by my adjusted variable. The variable has to be declared before my task starts. And the timer is based on that previous value and not the modified. Seems that the timer needs some kind of recalculation.

Roger