Crons API
The app's scheduled jobs: its own (backups, cleanups, whose ids start with __pb) and the ones your code adds with
cronAdd. All endpoints are for superusers.
List jobs
GET /api/crons
[
{ "id": "__pbLogsCleanup__", "expression": "0 */6 * * *" },
{ "id": "nightlyReport", "expression": "0 6 * * *" }
]
Run a job now
POST /api/crons/{id}
Starts the job at once, outside its schedule, and answers 204 without waiting for it to finish.
curl -X POST http://127.0.0.1:8090/api/crons/nightlyReport -H "Authorization: $TOKEN"
Next
- JavaScript API:
cronAdd: add a job from a hook file.
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.