You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement scheduled power-up with cron-based auto power-on and time-bound keep-alive
Add scheduled_power_up_times to machine config with cron expressions for automatic power-up and keep_alive_time for post-wake keep-alive duration. Introduce ScheduledPowerUpManager with its own event loop; overlapping keep-alive windows are automatically merged. Extract _send() helper from TargetKeepAliveSender and add stop() for clean thread/loop teardown.
"cron":"0 7 * * 1-5", // Cron expression for auto power-up
79
+
"keep_alive_time":7200// Send keep-alive requests for N seconds after power-up
80
+
}
81
+
]
76
82
},
77
83
// ... more machines ...
78
84
},
@@ -136,3 +142,16 @@ or the special process will be killed.
136
142
You can combine this mode with `circadian`'s `process_block` config to keep it from auto-suspending.
137
143
138
144
If you enable `keep_alive_mode` in proxy mode's config, the proxy will send requests to `/watchdog/feed` of this machine whenever there is any traffic towards this machine through it.
145
+
146
+
### Scheduled power-up
147
+
148
+
You can configure `scheduled_power_up_times` in each machine entry to automatically power up the machine at specified times using
149
+
a cron expression. After the machine comes online, the proxy sends keep-alive requests to the machine's keep-alive daemon
150
+
(for the duration specified by `keep_alive_time`) to prevent it from auto-suspending during the expected usage window.
151
+
152
+
Each entry in `scheduled_power_up_times` contains:
153
+
-`cron`: A standard 5-field cron expression (e.g. `"0 7 * * 1-5"` for weekdays at 7:00)
154
+
-`keep_alive_time`: Duration in seconds to send keep-alive requests after power-up (e.g. `7200` for 2 hours)
155
+
156
+
If multiple entries overlap in time, the keep-alive period is automatically extended to cover the longest window, and no
0 commit comments