<p>With App Engine GAE, we will usually have yaml with different cron tasks as follows:</p>
<pre><code>cron:
# Notifications Job
- description: &quot;Remove Notifications Cron Weekly run&quot;
  url: /tasks/notifications
  schedule: every monday 09:00
  timezone: Australia/NSW
# Jobs job
- description: &quot;Remove Deleted Jobs / completed&quot;
  url: /tasks/jobs/deleted_completed_drafts
  schedule: every monday 09:00
  timezone: Australia/NSW
# Marketplace job
- description: &quot;Remove Deleted Products / soldout&quot;
  url: /tasks/products/deleted_soldout_drafts
  schedule: every monday 09:00
  timezone: Australia/NSW
</code></pre>
<p>I moved to GKE, I can't figure out yet exactly how to run the above cron tasks from one file:</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: Cron Task
spec:
  schedule: &quot;*/1 0 0 * * 0&quot; #&quot;*/1 * * * *&quot;
  startingDeadlineSeconds: 104444
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: callout
            image: gcr.io/my-site/mysite-kubernetes:v0.0.16
            args:
            - /bin/sh
            - -ec
            - curl https://www.ksite.com/tasks/notifications
          restartPolicy: Never
</code></pre>
<p>So how do I arrange the GKE Cron file to accommodate all the above tasks?
Do I have to write different(codes) for each different task?</p>
<p>The schedule should be every Monday 09:00 timezone: Australia/NSW. Is schedule: <strong>&quot;*/1 0 0 * * 0&quot;</strong> a correct representation of that?</p>
<p>Do I have to specify an image, cause the web-deployment script already has the image specified?</p>

<p>I am not too familiar with App Engine, but</p>
<ul>
<li>All <code>CronJob</code> schedule: times are based on the timezone of the kube-controller-manager according to the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">docs</a></li>
<li>You don't need your app image to do a curl call. <a href="https://hub.docker.com/r/curlimages/curl" rel="nofollow noreferrer">A curl image will probably be enough</a></li>
<li>If the <code>CronJob</code> is running in the same cluster as the app, you don't need to go over the Loadbalancer, you can as well use the service like <code>http://service-name/tasks/notifications</code></li>
<li>It is probably better to write three <code>Cronjobs</code> than to try to cram all three calls into one.</li>
</ul>
