The cron job configuration is the configuration of the entire application area; it is not the configuration of a specific service / version. Each cron deployment (which can be performed without the need to update the service / version) will overwrite the previously deployed.
To avoid random errors, I personally have one application-level cron configuration file, symbolically linked inside each service as needed.
If you want to save the cron job for an older version, you need to add a configuration entry for it for the purpose corresponding to this service / version, otherwise the cron job will stop working if this version is no longer the default (since the requests initiated by cron will be directed to the default service / version):
From Creating a cron Job :
<?xml version="1.0" encoding="UTF-8"?> <cronentries> <cron> <url>/tasks/summary</url> <target>beta</target> <description>daily summary job</description> <schedule>every 24 hours</schedule> </cron> </cronentries>
The target specification is optional and is the name of the service / version. If present, the target is added to your application. hostname, as a result of which the task should be redirected to this service / version. If no target is specified, the task will be executed in the standard version by default.
source share