Schedule recurring jobs and one-off tasks from your nself backend. Uses Redis-backed queues for reliable execution with configurable retry policies, run history, and HTTP action support.
nself-cron is part of the ɳClaw bundle and requires the Redis service. Enable Redis in your .env with ENABLE_REDIS=true before installing.
# Redis is required, enable it first
echo "ENABLE_REDIS=true" >> .env
nself license set nself_pro_...
nself plugin install cron
nself build
nself start| Variable | Required | Default | Description |
|---|---|---|---|
PLUGIN_CRON_REDIS_URL | No | redis://127.0.0.1:6379 | Redis connection URL for job queue storage |
The Redis URL defaults to the nself-managed Redis instance. Override only if you are using an external Redis.
# Run a webhook every day at 9am
curl -X POST http://127.0.0.1:3713/cron/jobs \
-H "Content-Type: application/json" \
-d '{
"name": "daily-digest",
"schedule": "0 9 * * *",
"action": {
"type": "http",
"url": "https://your-app.com/api/send-digest",
"payload": { "template": "daily" }
},
"max_retries": 3,
"retry_delay_seconds": 60
}'# List all jobs
curl http://127.0.0.1:3713/cron/jobs
# View run history
curl http://127.0.0.1:3713/cron/runs
# Get a specific job
curl http://127.0.0.1:3713/cron/jobs/job-id-hereStandard 5-field cron syntax: minute hour day month weekday
| Expression | Meaning |
|---|---|
* * * * * | Every minute |
0 * * * * | Every hour at :00 |
0 9 * * * | Every day at 9:00 AM UTC |
0 9 * * 1 | Every Monday at 9:00 AM UTC |
0 0 1 * * | First day of every month at midnight |
*/15 * * * * | Every 15 minutes |
All times are UTC. The plugin does not support timezone-aware cron expressions.
{
"name": "string", // unique job name
"schedule": "0 9 * * *", // cron expression
"action": {
"type": "http", // only "http" supported currently
"url": "https://...", // URL to POST to when job fires
"payload": {}, // optional JSON body for the request
"headers": {} // optional HTTP headers
},
"max_retries": 3, // retry count on failure (default: 0)
"retry_delay_seconds": 60, // wait between retries (default: 30)
"enabled": true // set false to pause without deleting
}| Endpoint | Method | Description |
|---|---|---|
/cron/jobs | GET | List all scheduled jobs |
/cron/jobs | POST | Create a new job |
/cron/jobs/:id | GET | Get a specific job by ID |
/cron/jobs/:id | DELETE | Delete a job |
/cron/runs | GET | List run history (paginated, most recent first) |
/cron/health | GET | Check plugin and Redis connectivity |
When a job action fails (non-2xx HTTP response or network error), the plugin retries according to max_retries and retry_delay_seconds. After all retries are exhausted, the run is recorded as failed and visible in /cron/runs.
# View failed runs
curl "http://127.0.0.1:3713/cron/runs?status=failed"nself plugin remove cronPort: 3713 | Bundle: ɳClaw ($0.99/mo) or ɳSelf+ ($3.99/mo) | Requires: Redis | Last Updated: April 2026 | Plugin Version 1.0.12