Schedule generic
schedule_generic¶
- Schema: public
- PK:
id(uuid, defaultgen_random_uuid())
Main scheduler table. Controls when and how often processes run. concurrency_partition_id groups tasks for concurrency limiting.
Columns¶
| Column | Type | Nullable | Default | Notes |
|---|---|---|---|---|
| id | uuid | NOT NULL | gen_random_uuid() | PK |
| type | varchar | NOT NULL | Process type discriminator | |
| base_id | uuid | YES | ||
| app_id | varchar | YES | ||
| concurrency_partition_id | varchar | NOT NULL | Groups tasks sharing a concurrency limit | |
| group_id | varchar | YES | Logical grouping | |
| process_start_time | timestamp | YES | now() | When current process started |
| process_end_time | timestamp | YES | now() | When current process ended |
| frequency | bigint | NOT NULL | Scheduling interval | |
| avg_processing_time | float8 | YES | Rolling average execution time | |
| inactive_processes | bigint | YES | 0 | Count of consecutive idle runs |
| adaptive_frequency | bigint | YES | Dynamically computed frequency | |
| data | jsonb | YES | Arbitrary payload | |
| options | jsonb | YES | Configuration flags | |
| max_concurrent_processes_per_concurrency_partition | bigint | NOT NULL | Hard concurrency cap per partition | |
| priority_in_group | int4 | YES | Lower = higher priority within group | |
| created_time | timestamp | YES | CURRENT_TIMESTAMP | |
| to_retry | bool | YES | false | Flagged for retry |
| custom_unique_constraint | varchar | YES | App-defined uniqueness key | |
| process_type_id | varchar | YES | ||
| max_concurrent_processes_per_connection | int4 | YES | Per-connection concurrency cap | |
| connection_id | uuid | YES |
Key indexes¶
schedule_generic_pkey-- PK onidschedule_generic_custom_unique_constraint_key-- UNIQUE oncustom_unique_constraint