1

I have created a cron job in GAE flexible environment which runs automatically for every 15 mins.

But on each instance creation, does the same cron job replicates for each instance? I'm not sure about this.

Avinash Raj
  • 172,303
  • 28
  • 230
  • 274

2 Answers2

2

No, the cron job is not replicated for each instance.

The cron job configuration is not a service/module-level configuration, it is an application-level one, shared by all services/modules, regardless of them using the standard or flexible environment or the number of instances they may have running.

Related: Cron per Service/Module (AppEngine)

Community
  • 1
  • 1
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
0

Just to add to the accepted answer, although only one instance of the cron job will be created, it's possible for the job to run more than once.

From Important considerations for schedule:

In some rare circumstances, it is possible for multiple instances of the same job to be requested, therefore, your request handler should be idempotent, and your code should ensure that there are no harmful side-effects if this occurs.

m.spyratos
  • 3,823
  • 2
  • 31
  • 40