Cloud Scheduler _ Error when publishing a new version

Hello,

I have an integration that I trigger using a Cloud Scheduler trigger. The first publishing worked fine and created a cron job to run my integration.

I then had to fix a bug in my integration. I have created a new version or the integration and made the corrections required without modifying the trigger settings. I tried to publish but got an error indicating that the job already existed

phertzog_0-1712665800751.png

To be able to publish the integration I have to delete the trigger and recreate it before publishing. 

Did I miss a step or is this the expected way of handling the integration upgrade?

 

Solved Solved
1 2 76
1 ACCEPTED SOLUTION

Hello @phertzog,

Welcome to the Google Cloud Community!

You're correct, encountering the "ALREADY_EXISTS" error message when attempting to create a Cloud Scheduler job with the same name as an existing one is the expected behavior.

However, there's a better way to handle your scenario than deleting and recreating the trigger for every integration update.

You can update the existing Cloud Scheduler job using the gcloud command-line tool or the Cloud Scheduler interface in the Google Cloud Console. In the update process, you'll specify the new version of your integration as the target for the Cloud Scheduler job. This ensures the job triggers the updated integration code. For more information, you can visit this page.

I also found a discussion in a StackOverflow post that explains your situation well. 

View solution in original post

2 REPLIES 2

Hello @phertzog,

Welcome to the Google Cloud Community!

You're correct, encountering the "ALREADY_EXISTS" error message when attempting to create a Cloud Scheduler job with the same name as an existing one is the expected behavior.

However, there's a better way to handle your scenario than deleting and recreating the trigger for every integration update.

You can update the existing Cloud Scheduler job using the gcloud command-line tool or the Cloud Scheduler interface in the Google Cloud Console. In the update process, you'll specify the new version of your integration as the target for the Cloud Scheduler job. This ensures the job triggers the updated integration code. For more information, you can visit this page.

I also found a discussion in a StackOverflow post that explains your situation well. 

Hello,

I think I need to develop my question. 

In my scenario, I don't try to recreate the trigger but I want to update an existing Application Integration Integration. The cloud scheduler is the trigger of my integration. 

The issue is that as soon as I try to publish my integration, the system tries to recreate the trigger (if I understand right) and I get an error. So to update a step of the integration I have to delete and recreate the trigger. This works but is a little heavy.

Regards