Scheduled Jobs
Any workflow can be scheduled to run automatically using a cron expression. DAEMI manages the crontab entry for you — you define the schedule in the Console or API, DAEMI handles the rest.
How It Works
When you save a scheduled job in DAEMI:
- DAEMI writes a crontab entry on the server
- At trigger time, cron calls
POST /api/jobs/{job_id}/runon the DAEMI server - DAEMI runs the associated workflow with the stored inputs
- Results are streamed (to SSE, and optionally to a notification target)
You never touch crontab directly. DAEMI owns it.
Creating a Scheduled Job
Via the Console
- Open the workflow you want to schedule
- Click Schedule in the workflow header
- Choose a schedule type:
- Preset — hourly, daily, weekly, monthly
- Custom cron — enter a cron expression
- Set default inputs for the workflow run
- (Optional) Configure a notification — email or Console alert on completion
- Click Save Schedule
Via API
POST /api/jobs
Content-Type: application/json
{
"workflow_id": "weekly_research",
"name": "Weekly AI Digest",
"schedule": "0 8 * * 1",
"inputs": {
"topic": "artificial intelligence",
"email": "kevin@example.com"
},
"notify": {
"on_complete": true,
"on_failure": true,
"channel": "email",
"target": "kevin@example.com"
}
}
Cron Expression Reference
DAEMI uses standard 5-field cron syntax:
┌───────────── minute (0–59)
│ ┌─────────── hour (0–23)
│ │ ┌───────── day of month (1–31)
│ │ │ ┌─────── month (1–12)
│ │ │ │ ┌───── day of week (0–6, Sunday=0)
│ │ │ │ │
* * * * *
Common Schedules
| Schedule | Cron Expression |
|---|---|
| Every day at 8am | 0 8 * * * |
| Every Monday at 9am | 0 9 * * 1 |
| Every hour | 0 * * * * |
| Every 15 minutes | */15 * * * * |
| Every weekday at 7am | 0 7 * * 1-5 |
| First day of month at midnight | 0 0 1 * * |
Managing Scheduled Jobs
List all jobs
GET /api/jobs
Get a specific job
GET /api/jobs/{job_id}
Update a schedule
PATCH /api/jobs/{job_id}
{
"schedule": "0 9 * * 1-5",
"inputs": { "topic": "ML news" }
}
Disable a job (without deleting)
PATCH /api/jobs/{job_id}
{ "enabled": false }
Delete a job
DELETE /api/jobs/{job_id}
DAEMI removes the crontab entry immediately on delete or disable.
Viewing Job Run History
GET /api/jobs/{job_id}/runs?limit=20
The Console shows job run history in Workflows → Scheduled with:
- Last run time and status
- Run duration
- Any error details
- Link to the full run log
Manual Trigger
Run a scheduled job immediately (same as cron would):
POST /api/jobs/{job_id}/run
This is also what the crontab entry calls — so manual and scheduled triggers are identical.
Timezone Handling
Cron runs in the server's local timezone. Timezone can be configured in the Console under Settings → System.