Not able to perform an update on the Cron Schedule for a workflow

Hello, I have just started learning about Temporal and am trying to update the CronSchedule for a previously created workflow.
However, I cannot find any documentation on how to do this.
I noticed the updateWorkflowExecution method, but when I tried it, I received an error message saying ‘PERMISSION_DENIED: UpdateWorkflowExecution operation is disabled on this namespace.’
Is there any way for me to enable the UpdateWorkflowExecution feature?

Hello,

‘PERMISSION_DENIED: UpdateWorkflowExecution operation is disabled on this namespace.’

for this error, I think you need to set frontend.enableUpdateWorkflowExecution=true in your dynamic config, see this example

am trying to update the CronSchedule for a previously created workflow.

I am not sure if I get this question and how it is related to UpdateWorkflowExecution, are you trying to update the What is a Temporal Workflow? | Temporal Documentation in the Schedule?

Thank you very much for your feedback.
I would like to update the CronSchedule of a previously created workflow, but I am not sure if I can do it with UpdateWorkflowExecution.
Up until now, the solution that I have implemented is to delete the old workflow and create a new one with the new CronSchedule.
However, if there is a better solution available, please let me know.

@nnv_saka

If you refer to cronSchedule temporal-cron-job , they can not be updated, you can use this approach instead samples-java/core/src/main/java/io/temporal/samples/updatabletimer/README.md at main · temporalio/samples-java · GitHub

or if you can, better use the new schedule feature that will allow you to update the schedule as this example demonstrate

Let me know if this example helps,

Antonio

1 Like

Yes, I have used the new schedule feature and it has solved my problem.
Thank you for your assistance.

@antonio.perez on another note is it recommended to use @UpdateMethod in production? We see it marked as @Experimental in the latest java SDK.