1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! Jobs Daemon — Background workflow scheduler for Nika.
//!
//! This module provides a daemon for scheduled workflow execution with:
//! - 4 trigger types: Cron, Webhook, Watch, Interval
//! - SQLite state persistence
//! - Retry with exponential backoff
//! - Notification channels (Slack, Email)
//!
//! # Usage
//!
//! ```bash
//! # Start the daemon
//! nika jobs start
//!
//! # Check status
//! nika jobs status
//!
//! # Stop the daemon
//! nika jobs stop
//!
//! # List jobs
//! nika jobs list
//!
//! # Trigger a job manually
//! nika jobs trigger <job-name>
//! ```
//!
//! # Configuration
//!
//! Jobs are configured in `.nika/jobs.toml`:
//!
//! ```toml
//! [daemon]
//! enabled = true
//! max_concurrent_jobs = 10
//!
//! [[jobs]]
//! name = "daily-report"
//! workflow = "workflows/report.nika.yaml"
//! [jobs.trigger]
//! type = "cron"
//! expression = "0 9 * * *"
//! timezone = "America/New_York"
//!
//! [[jobs]]
//! name = "on-change"
//! workflow = "workflows/process.nika.yaml"
//! [jobs.trigger]
//! type = "watch"
//! paths = ["data/**/*.json"]
//! debounce = "5s"
//! ```
// Re-exports for convenience
pub use ;
pub use JobsError;
pub use ;
pub use JobScheduler;
pub use ;
/// Result type for Jobs Daemon operations.
pub type JobsResult<T> = ;