--- title: "Update Cron" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/job-scheduling/cron/update-cron/ description: "This page describes the Java method to update a cron in the project with sample code snippets." last_updated: 2026-09-08T11:07:33Z service: Job Scheduling type: general related_links: - name: "Component Help Documentation" url: /en/job-scheduling/help/cron/introduction/ - name: "JavaScript SDK Documentation" url: /en/sdk/javascript/v1/job-scheduling/cron/update-cron/ - name: "Python SDK" url: /en/sdk/python/v1/job-scheduling/cron/update-cron/ - name: "REST API Collection" url: /en/api/code-reference/job-scheduling/cron/update-cron/update-one-time-cron/#UpdateaOne-TimeCron --- # Update Cron The following SDK can be used to update a particular cron's details. You can use this SDK to update the name, description and target. You can select your required cron by passing the [`cron id`](https://docs.catalyst.zoho.com/en/job-scheduling/help/cron/key-concepts/#cron-id) to `getCron()` method. > **Note:** You can use this method to update details of both [Pre-Defined Crons](https://docs.catalyst.zoho.com/en/job-scheduling/help/implementation/submit-job-predefined-cron/) and [Dynamic Crons](https://docs.catalyst.zoho.com/en/job-scheduling/help/implementation/submit-job-dynamic-cron/). #### Sample Code Snippet **Package Imports** ```java import com.zc.component.jobscheduling.beans.cron.ZCCronDetails; ``` ```java ZCCronDetails cron = jobScheduling.cron.getCron(12378634912l); // get cron with cron Id cron.setCronName("test_cron"); // set new cron name ZCCronDetails updatedCronA = jobScheduling.cron.updateCron(12378634912l, cron); // update cron with cron Id updatedCronA.setCronName("updated_test_cron"); ZCCronDetails updatedCronB = jobScheduling.cron.updateCron("test_cron", cron); // update cron with cron name ```