jobs

1 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 gen_random_uuid()
jobs_tasks.job_id FK_jobs_tasks_jobs_job_id C

Unique identifier.

tenant_id uuid 2147483647 null
tenants.id FK_jobs_tenants_tenant_id C

Tenant identifier.

name varchar 256 null
type int4 10 0

Type of the job. Options: 0 - Manual (Default, manual run only), 1 - Automatic (Run automatically based on schedule, if no schedule is supplied - run once on server start), 2 - Disabled.

status int4 10 0

Status of the last job run. Options: 0 - Stopped (Default), 1 - Running, 2 - Paused.

result int4 10 0

Result of the last job run. Options: 0 - None (Default, Job was never run), 1 - Pending (Job is executing but no result was yielded yet), 2 - Succeeded (Job succeeded when all of its Tasks succeeded), 3 - Failed (Job failed when any of its Tasks failed). Reset to None on each run.

started_at timestamptz 35,6 √ null

DateTime job was last run. Reset to DateTime.Now on each run.

started_by uuid 2147483647 √ null

User who last run the job. Null if System, reset on each run.

duration int4 10 √ null

Last job duration in milliseconds. Reset to null on each run.

schedule text 2147483647 √ null

CRON scheduler notation, i.e. “0/5 * * * * ?”.

created_at timestamptz 35,6 now()

DateTime the record was created.

created_by uuid 2147483647 √ null

User who create the record. Null if System.

updated_at timestamptz 35,6 √ null

DateTime the record was last updated.

updated_by uuid 2147483647 √ null

User who last updated the record.

is_system bool 1 false

A system-generated record. Default = false

description text 2147483647 √ null

Indexes

Constraint Name Type Sort Column(s)
PK_jobs Primary key Asc id
IX_jobs_created_at Performance Asc created_at
IX_jobs_id Must be unique Asc id
IX_jobs_is_system Performance Asc is_system
IX_jobs_name Performance Asc name
IX_jobs_result Performance Asc result
IX_jobs_started_at Performance Asc started_at
IX_jobs_status Performance Asc status
IX_jobs_tenant_id Performance Asc tenant_id
IX_jobs_type Performance Asc type

Relationships