File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,7 +202,8 @@ The runtime consists of three packages:
202202Headers sent to the function:
203203- ` X-Worker-Id ` — worker instance identifier
204204- ` X-Job-Id ` — job row ID
205- - ` X-Database-Id ` — database context
205+ - ` X-Database-Id ` — database context (nullable)
206+ - ` X-Actor-Id ` — user who triggered the job (nullable)
206207
207208### Key Environment Variables
208209
@@ -218,10 +219,13 @@ Headers sent to the function:
218219For recurring jobs, use ` app_jobs.add_scheduled_job() ` or the ` runtime_schedules ` table (in agentic-db):
219220
220221``` sql
222+ -- database_id and actor_id are read from JWT claims automatically
221223SELECT app_jobs .add_scheduled_job (
222- ' daily_report' , -- task_identifier
223- ' 0 9 * * *' , -- cron expression (9 AM daily)
224- ' {"report_type": "daily"}' ::json -- payload
224+ identifier := ' daily_report' ,
225+ payload := ' {"report_type": "daily"}' ::json,
226+ schedule_info := json_build_object(
227+ ' rule' , ' 0 9 * * *' -- 9 AM daily
228+ )
225229);
226230```
227231
You can’t perform that action at this time.
0 commit comments