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

**URL:** <https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [June 24, 2023, 5:54pm UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638 "2023-06-24T17:54:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnv\_saka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/nnv_saka/32/3950_2.png) [@nnv\_saka](https://community.temporal.io/u/nnv_saka)\
**Post date:** [June 24, 2023, 5:54pm UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638/1 "2023-06-24T17:54:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [June 26, 2023, 2:58pm UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638/4 "2023-06-26T14:58:25Z")

</div>

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

> <https://github.com/temporalio/samples-java/blob/307a2df3e5adc269fb21d8a7e8afdd001d9ef72d/core/src/main/java/io/temporal/samples/hello/HelloUpdate.java#L49>

> 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](https://docs.temporal.io/workflows#spec) in the Schedule?

---

<div class="post-metadata">

**Author:** ![nnv\_saka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/nnv_saka/32/3950_2.png) [@nnv\_saka](https://community.temporal.io/u/nnv_saka)\
**Post date:** [June 26, 2023, 3:12pm UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638/5 "2023-06-26T15:12:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [June 26, 2023, 3:29pm UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638/6 "2023-06-26T15:29:56Z")

</div>

@nnv_saka

If you refer to cronSchedule [temporal-cron-job](https://docs.temporal.io/workflows?&_ga=2.125076364.762961638.1687709919-167080156.1680123165#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](https://github.com/temporalio/samples-java/blob/main/core/src/main/java/io/temporal/samples/updatabletimer/README.md)

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

> <https://github.com/temporalio/samples-java/blob/307a2df3e5adc269fb21d8a7e8afdd001d9ef72d/core/src/main/java/io/temporal/samples/hello/HelloSchedules.java#L224>

Let me know if this example helps,

Antonio

---

<div class="post-metadata">

**Author:** ![nnv\_saka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/nnv_saka/32/3950_2.png) [@nnv\_saka](https://community.temporal.io/u/nnv_saka)\
**Post date:** [June 27, 2023, 9:10am UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638/7 "2023-06-27T09:10:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![akshit019](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@akshit019](https://community.temporal.io/u/akshit019)\
**Post date:** [January 17, 2024, 8:31am UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638/8 "2024-01-17T08:31:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![n00b](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@n00b](https://community.temporal.io/u/n00b)\
**Post date:** [August 29, 2024, 9:21am UTC](https://community.temporal.io/t/not-able-to-perform-an-update-on-the-cron-schedule-for-a-workflow/8638/9 "2024-08-29T09:21:30Z")

</div>

what if we just want to create a simple CRON schedule? If I follow this [How do I convert my Cron into a Schedule? | Temporal Technologies](https://temporal.io/blog/how-do-i-convert-my-cron-into-a-schedule) How do i make sure that on application restart a new schedule isnt created?
