Official TypeScript SDK for Cronhost - schedule HTTP requests with cron expressions.
npm install cronhostimport { Cronhost } from "cronhost";
const cronhost = new Cronhost({
apiKey: "ch_your_api_key_here",
});
// Create a new schedule
const schedule = await cronhost.createSchedule({
name: "Daily Health Check",
cronExpression: "0 9 * * *", // 9 AM daily
timezone: "UTC",
endpoint: "https://api.example.com/health",
httpMethod: "GET",
});
// Get all schedules
const schedules = await client.getSchedules();
// Get job history
const jobs = await client.getJobs({ scheduleId: schedule.id });const cronhost = new Cronhost({
apiKey: "ch_your_api_key_here",
});getSchedules()- List all schedulesgetSchedule(id)- Get a specific schedulecreateSchedule(data)- Create a new scheduleupdateSchedule(id, data)- Update an existing scheduledeleteSchedule(id)- Delete a scheduletriggerSchedule(id)- Manually trigger a scheduletoggleSchedule(id, enabled)- Enable/disable a schedule
getJobs(params)- List jobs with optional filteringgetJob(id)- Get a specific job
For complete API documentation, visit docs.cronho.st
MIT