使用方法
- 复制安装命令,在自己的智能体环境安装前先检查源码包。
- 从原始文档核对所需工具、凭据和支持的宿主。
- 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/catalystbyzoho/agent-skills --skill catalyst-job-scheduling开始前需了解
- 安装不包含模型订阅、API 额度或访问文件的权限。
- 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。
Catalyst Job Scheduling
Job Scheduling runs background work in three pieces: job pools (capacity containers), jobs (one execution each, submitted immediately via API/SDK/MCP), and crons (schedulers that submit jobs on a timetable). Every fact in this skill and its references is runtime-verified against a live Catalyst project (Aug 2026) unless marked otherwise.
Prerequisites
Before any operation, load references/job-scheduling-basics.md — it covers the five setup rules that cause most failures: job pool must exist first (no default), targets must be JOB-type functions, all time values in seconds, job_name limits, and function-vs-pool memory constraints.
How It Works
- Identify the target type: Job function (most common), Webhook (any HTTP URL), Circuit, or AppSail. Create/verify a matching-type job pool (Function pools size by
memoryMB; the others by concurrentnumber1–10). - One-off work → submit an immediate job (MCP
CatalystbyZoho_Create_Immediate_Jobor SDKjobScheduling().job().submitJob()). Recurring or delayed work → create a cron (CatalystbyZoho_Create_Cron_Jobor SDKcron().createCron()) choosing Periodic / OneTime / Calendar / CronExpression. Loadreferences/job-scheduling-basics.mdfor exact payloads for both paths. - Write the Job function handler
(jobRequest, context): initialize the SDK withcatalyst.initialize(context, { scope: 'admin' }), read inputs viajobRequest.getAllJobParams()(all values arrive as strings), and ALWAYS end withcontext.closeWithSuccess()orcloseWithFailure()— failure is what triggers the retry chain. - For retries, dynamic scheduling, webhook targets, or monitoring, load
references/job-scheduling-advanced.md— retry semantics (new job records linked byparent_job_id), firing behaviors (Periodic crons fire immediately on create AND update; past-dated OneTime fires instantly; OneTime auto-disables after firing), and observability traps (success/failure counters stay 0; dynamic crons are hidden from list APIs). - Verify by job records, not counters:
CatalystbyZoho_Get_Job_By_Idshowsjob_status(PENDING → RUNNING → SUCCESS | FAILURE),execution_time,dispatch_delay,response_code. Do not trust cronsuccess_count/failure_count— they stay 0.
Security Checklist
- Never log `jobRequest.getJobDetails()` or `getJobMetaDetails()` wholesale — at runtime their
headerscontain live credentials (X-ZC-PROJECT-SECRET-KEY,X-ZC-Admin-Cred-Token). Extract only the fields you need. - Webhook-target jobs to your own project's function URLs carry those same credential headers; treat webhook receiver logs as sensitive.
- Job functions run with admin privileges — validate/whitelist anything you accept via
paramsbefore using it in queries. - Never store secrets in job `headers`/`params` —
Get_Job_By_Id/Get_Cron_Job_By_Id/List_All_Cronsreturn them in plaintext. Never paste a raw cron/job dump into chat, issues, or logs.
Hallucination Guards
- The SDK enum
CRON_TYPE.CALENDER("Calender") is misspelled and rejected by the server. Use the string'Calendar'. retry_intervalis NOT milliseconds. Seconds, 60–86400.15 * 60 * 1000is rejected.- Immediate jobs and scheduled jobs share the same 15-minute timeout;
context.getMaxExecutionTimeMs()returns the STRING"900000"(parseIntbefore math), whilegetRemainingExecutionTimeMs()returns a number.
Triggers
- "job scheduling", "job pool", "jobpool",
jobpool_id, "create a job pool" - "submit a job", "immediate job", "background job", "run this function as a job",
submitJob,Create_Immediate_Job - "cron", "cron job", "scheduled function", "schedule a function", "recurring job",
createCron,Create_Cron_Job,cron_expression,time_of_execution, "Periodic", "OneTime cron", "Calendar cron" - "retry a job",
number_of_retries,retry_interval,parent_job_id, "dunning", "billing schedule", "trial expiry job" pauseCron,resumeCron,runCron,deleteCron, "pause a cron", "trigger a cron manually",Submit_Cron_Job- Errors: "The given function is not a job function", "jobname must contain only alphanumeric and underscore", "jobname should be within 1-20 char length", "retry interval should be within 60s", "Delete all associated Pre-defined Crons before deleting Job Pool", "memory allocated for the Job Function is higher"
- "webhook job", "call a URL on schedule",
notify_url
References
| File | Load when the query is about… |
|---|---|
references/job-scheduling-basics.md | Core concepts, job pools, immediate jobs, all 4 cron types, MCP tool workflows, Node SDK calls, Job function handler template, CLI setup |
references/job-scheduling-advanced.md | Retry semantics, dynamic (in-code) cron creation, firing/timing behaviors, webhook-target jobs, notify_url, monitoring/observability, security guardrails, pool capacity rules |




