Hoody Cron service provides scheduled task management for your container. This page covers the service’s operational endpoints, including a health probe for monitoring and endpoints that expose the service’s OpenAPI specification for client generation and introspection.
All endpoints are served from your container’s Cron instance at https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.icu.
Health
Section titled “Health”GET /health
Section titled “GET /health”Returns a snapshot of the Cron service’s runtime status, including process information, resource usage, and startup metadata. Use this endpoint for liveness and readiness probes.
This endpoint takes no parameters.
curl https://myproject-mycontainer-cron-1.us-east.containers.hoody.icu/healthconst health = await client.cron.health.check();console.log(health.status, health.pid);{ "built": "2024-01-15T10:30:00Z", "fds": 14, "ip": "10.0.1.42", "memory": { "heap": 8388608, "rss": 25165824 }, "pid": 1, "service": "cron", "started": "2024-01-15T10:00:00Z", "status": "ok", "user_agent": "Hoody-SDK/1.0"}Response fields
Section titled “Response fields”| Field | Type | Required | Description |
|---|---|---|---|
built | string | null | No | Build timestamp or identifier for the running service |
fds | integer | null | No | Number of open file descriptors held by the process |
ip | string | Yes | IP address the service is bound to |
memory | object | null | No | Memory usage snapshot containing heap (bytes) and rss (bytes) |
pid | integer | Yes | Operating system process ID |
service | string | Yes | Service identifier (cron) |
started | string | Yes | ISO 8601 timestamp of when the service started |
status | string | Yes | Health status indicator (typically "ok") |
user_agent | string | null | No | User agent string of the most recent client, if available |
OpenAPI Specification
Section titled “OpenAPI Specification”The service publishes its own API contract in both JSON and YAML formats. These endpoints are useful for generating typed clients, validating integrations, or exploring the available operations at runtime.
GET /openapi.json
Section titled “GET /openapi.json”Returns the Cron service’s OpenAPI specification as a JSON document.
This endpoint takes no parameters.
curl https://myproject-mycontainer-cron-1.us-east.containers.hoody.icu/openapi.jsonconst spec = await client.cron.system.getOpenApiJson();console.log(spec.openapi, spec.info.title);{ "openapi": "3.0.3", "info": { "title": "Hoody Cron API", "version": "1.0.0", "description": "Scheduled task management for Hoody containers" }, "paths": { "/health": { "get": { "summary": "Service health check", "responses": { "200": { "description": "Service is healthy" } } } } }}GET /openapi.yaml
Section titled “GET /openapi.yaml”Returns the Cron service’s OpenAPI specification as a YAML document.
This endpoint takes no parameters.
curl https://myproject-mycontainer-cron-1.us-east.containers.hoody.icu/openapi.yamlconst spec = await client.cron.system.getOpenApiYaml();console.log(spec);openapi: 3.0.3info: title: Hoody Cron API version: 1.0.0 description: Scheduled task management for Hoody containerspaths: /health: get: summary: Service health check responses: '200': description: Service is healthy{ "code": "BACKEND_ERROR", "details": "Unable to read OpenAPI source file", "message": "Internal server error"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
BACKEND_ERROR | Backend error | Failed to read or write system crontab | Check crontab availability and permissions |