{"id":32618838,"url":"https://github.com/kapersoft/cron-job-api","last_synced_at":"2026-01-20T16:57:13.854Z","repository":{"id":313713371,"uuid":"1047567422","full_name":"kapersoft/cron-job-api","owner":"kapersoft","description":"A PHP client for the cron-job.org API","archived":false,"fork":false,"pushed_at":"2025-10-27T00:29:52.000Z","size":85,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T02:33:08.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kapersoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"kapersoft"}},"created_at":"2025-08-30T17:52:45.000Z","updated_at":"2025-10-27T00:29:54.000Z","dependencies_parsed_at":"2025-09-08T02:33:55.035Z","dependency_job_id":"49971bf3-a8f9-4eab-a66a-349023d9117b","html_url":"https://github.com/kapersoft/cron-job-api","commit_stats":null,"previous_names":["kapersoft/cron-job-api"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kapersoft/cron-job-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapersoft%2Fcron-job-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapersoft%2Fcron-job-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapersoft%2Fcron-job-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapersoft%2Fcron-job-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapersoft","download_url":"https://codeload.github.com/kapersoft/cron-job-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapersoft%2Fcron-job-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281853653,"owners_count":26573096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-30T17:57:35.089Z","updated_at":"2026-01-20T16:57:13.847Z","avatar_url":"https://github.com/kapersoft.png","language":"PHP","funding_links":["https://github.com/sponsors/kapersoft"],"categories":[],"sub_categories":[],"readme":"# cron-job-api (PHP client for cron-job.org)\n\nSmall, typed PHP 8.4+ client for the cron-job.org v1 API. No framework required; uses Guzzle under the hood.\n\n## What is this repo?\n\nThis is `kapersoft/cron-job-api`, a lightweight wrapper around the public cron-job.org API, providing simple methods to list, create, update, delete, and inspect jobs and their history.\n\n## What is cron-job.org?\n\n[cron-job.org](https://cron-job.org) is a hosted scheduler. It executes HTTP(S) requests on schedules (minutes to months), great for pinging endpoints, running webhooks, and health checks without maintaining your own cron infrastructure.\n\n## Installation\n\n```bash\ncomposer require kapersoft/cron-job-api\n```\n\nRequirements:\n\n- PHP ^8.4\n- Guzzle ^7.10 (pulled in automatically)\n\n## How to use\n\nBasic client setup and common operations. Replace `$apiKey` with your cron-job.org API token.\n\n```php\n\u003c?php\n\nuse Kapersoft\\CronJobApi\\Client;\n\n$client = new Client($apiKey); // Authorization: Bearer \u003ctoken\u003e\n```\n\nList jobs:\n\n```php\nuse Kapersoft\\CronJobApi\\Job;\n\n$jobList = $client-\u003elist();\nforeach ($jobList-\u003ejobs as $job) {\n    /** @var Job $job */\n    echo $job-\u003ejobId.' '.$job-\u003etitle.PHP_EOL;\n}\n```\n\nGet one job (with full details):\n\n```php\n$detailed = $client-\u003eget(123); // returns DetailedJob\necho $detailed-\u003etitle;\n```\n\nCreate a job:\n\n```php\nuse Kapersoft\\CronJobApi\\{Job, Schedule, RequestMethodEnum};\n\n$newJobId = $client-\u003ecreate(new Job(\n    enabled: true,\n    title: 'Ping production',\n    url: 'https://example.com/health',\n    requestTimeout: 30,\n    redirectSuccess: true,\n    schedule: new Schedule(\n        timezone: 'UTC',\n        expiresAt: 0,        // 0 = never expires\n        hours: [-1],         // every hour\n        mdays: [-1],         // every day of month\n        minutes: [0, 30],    // on minute 0 and 30\n        months: [-1],        // every month\n        wdays: [-1],         // every day of week\n    ),\n    requestMethod: RequestMethodEnum::GET,\n));\n```\n\nUpdate a job (partial fields):\n\n```php\n$client-\u003eupdate($newJobId, new Job(title: 'Ping prod (renamed)'));\n```\n\nDelete a job:\n\n```php\n$client-\u003edelete($newJobId);\n```\n\nList history and fetch a specific run:\n\n```php\n$history = $client-\u003ehistory(123);\n$firstRun = $history-\u003ehistory[0];\n$details = $client-\u003ehistoryItem(123, $firstRun-\u003eidentifier);\n```\n\nOptionally provide a custom Guzzle client (timeouts, retries, proxy, etc.):\n\n```php\n$guzzle = new \\GuzzleHttp\\Client(['timeout' =\u003e 10]);\n$client = new Client($apiKey, baseUrl: null, guzzleHttpClient: $guzzle);\n```\n\n## How to report issues\n\n- Open an issue: [GitHub Issues](https://github.com/kapersoft/cron-job-api/issues)\n- Please include minimal repro code, expected vs. actual behavior, and versions.\n\n## License information\n\nThis library is MIT licensed. See [LICENSE.md](LICENSE.md).\n\n## Security information\n\nDo not post vulnerabilities in public issues. See [SECURITY.md](SECURITY.md).\n\n## How to contribute\n\nRead [CONTRIBUTING.md](CONTRIBUTING.md) for setup, coding standards, and workflow. PRs with focused changes and tests are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapersoft%2Fcron-job-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapersoft%2Fcron-job-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapersoft%2Fcron-job-api/lists"}