Update CronAdmin Scope

Note: Ensure you have installed the required package to use this SDK method.

You can use the updateCron() SDK method to update the name, description, and target of a Pre-defined or Dynamic cron.

You can select your required cron by passing the cron ID to the getCron() method, and update the details using the updateCron() method.

The jobScheduling reference used in the code snippets below is the component instance created to perform these operations.

copy
const cron = await jobScheduling.CRON.getCron('test_cron'); // get cron
cron.cron_name = 'test';
const updatedCronDetailsWithName = await jobScheduling.CRON.updateCron('test_cron', cron); // update cron details with cron name
updatedCronDetailsWithName.cron_name = 'test_new';
const updatedCronDetailsWithId = await jobScheduling.CRON.updateCron('1234567890', updatedCronDetailsWithName); // update cron details with cron id

Last Updated 2026-07-02 14:51:41 +0530 IST