runtraj.execution.kubernetes.cron_job_manifest#

runtraj.execution.kubernetes.cron_job_manifest(name, project, execution, *, output, delay=8)[source]#

Return the CronJob that runs runtraj tick for a project every hour.

One pod at a time (a tick still running holds back the next), at 15 minutes past each hour in UTC (SCHEDULE), with the pods and exit-code rules of job_manifest(). Its Job fails after active_deadline_seconds, or TICK_DEADLINE when that is unset, so a pod that hangs does not stay active and, with concurrencyPolicy: Forbid, block every later hour. The last day’s Jobs are kept, with the project’s label. It is named by cron_job_name(), so scheduling a project again replaces it.

Parameters:
  • name (str) – The project’s name, for the CronJob’s name and labels.

  • project (str) – What the pods open: the URL of the inputs, or the project folder’s path on a volume they mount.

  • execution (ExecutionConfig) – Settings with a kubernetes block.

  • output (str) – The output directory the pods write to.

  • delay (int) – Hours before an hour is added (runtraj.execution.schedule.DELAY_HOURS).

Return type:

dict[str, Any]