Hoody Cron
Section titled “Hoody Cron”The Cron service provides scheduled task execution within Hoody containers. This page documents the endpoints exposed by the Cron service for health monitoring and OpenAPI specification retrieval.
All endpoints are accessed on the container-scoped hostname:
https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com
Replace {projectId}, {containerId}, and {server} with the actual project, container, and server identifiers for your deployment.
Health
Section titled “Health”GET /health
Section titled “GET /health”Returns the current health status of the Cron service instance, including process information, uptime, and resource usage.
This endpoint takes no parameters.
curl -X GET "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/health"import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.cron.health.check();{ "status": "ok", "service": "cron", "started": "2024-01-15T10:30:00Z", "pid": 1234, "ip": "10.0.0.5", "built": "2024-01-15T09:00:00Z", "fds": 10, "memory": { "rss": 52428800, "heap": 20971520 }, "user_agent": "Hoody-Cron/1.0"}Response fields
Section titled “Response fields”| Field | Type | Required | Description |
|---|---|---|---|
built | string | null | No | Build timestamp of the Cron service binary |
fds | integer | null | No | Number of open file descriptors |
ip | string | Yes | IP address the service is bound to |
memory | object | null | No | Memory usage statistics (contains rss, and optionally heap) |
pid | integer | Yes | Process ID of the running service |
service | string | Yes | Name of the service (cron) |
started | string | Yes | ISO 8601 timestamp marking when the service started |
status | string | Yes | Health status indicator |
user_agent | string | null | No | Identifier of the client or user agent making the request |
OpenAPI Specification
Section titled “OpenAPI Specification”GET /openapi.json
Section titled “GET /openapi.json”Returns the OpenAPI specification for the Cron service in JSON format. Use this to generate client libraries or to explore the full service API surface.
This endpoint takes no parameters.
curl -X GET "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/openapi.json"import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.cron.system.getOpenApiJson();{ "openapi": "3.0.0", "info": { "title": "Hoody Cron API", "version": "1.0.0" }, "paths": {}}GET /openapi.yaml
Section titled “GET /openapi.yaml”Returns the OpenAPI specification for the Cron service in YAML format.
This endpoint takes no parameters.
curl -X GET "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/openapi.yaml"import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.cron.system.getOpenApiYaml();openapi: 3.0.0info: title: Hoody Cron API version: 1.0.0paths: {}{ "code": "BACKEND_ERROR", "message": "Internal server error", "details": "Failed to read or write system crontab"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
BACKEND_ERROR | Backend error | Failed to read or write system crontab | Check crontab availability and permissions |