2026-06-27 08:10:40 +05:30
|
|
|
|
/**
|
2026-06-29 11:35:56 +05:30
|
|
|
|
* @fileoverview Cron service: CRUD for cron jobs, manual Run Now,
|
2026-06-27 08:10:40 +05:30
|
|
|
|
* the background due-job tick, and run-history recording.
|
|
|
|
|
|
*
|
|
|
|
|
|
* It does NOT own session/tmux logic — it reuses Codeman's existing session
|
|
|
|
|
|
* layer (create → addSession → setupSessionListeners → startInteractive/Shell →
|
|
|
|
|
|
* send prompt via writeViaMux/write), mirroring the "quick start" route flow.
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
|
import { readFile } from 'node:fs/promises';
|
|
|
|
|
|
import { statSync } from 'node:fs';
|
|
|
|
|
|
import { Session } from '../session.js';
|
|
|
|
|
|
import { SseEvent } from '../web/sse-events.js';
|
|
|
|
|
|
import { getErrorMessage } from '../types/api.js';
|
|
|
|
|
|
import { MAX_CONCURRENT_SESSIONS } from '../config/map-limits.js';
|
2026-06-29 11:35:56 +05:30
|
|
|
|
import { CRON_READY_MAX_ATTEMPTS, CRON_READY_SETTLE_MS } from '../config/server-timing.js';
|
|
|
|
|
|
import { computeNextRunAt, dueKeyFor } from './cron-time.js';
|
2026-06-27 08:10:40 +05:30
|
|
|
|
import type { SessionPort, EventPort, ConfigPort, InfraPort } from '../web/ports/index.js';
|
2026-06-29 11:35:56 +05:30
|
|
|
|
import type { CronJob, CronJobRun, CronJobRunStatus, TriggerType } from '../types/cron.js';
|
|
|
|
|
|
import type { CronJobInput } from './cron-input.js';
|
2026-06-27 08:10:40 +05:30
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
/** The subset of the route context the cron depends on. */
|
|
|
|
|
|
export type CronDeps = SessionPort & EventPort & ConfigPort & InfraPort;
|
2026-06-27 08:10:40 +05:30
|
|
|
|
|
|
|
|
|
|
const delay = (ms: number): Promise<void> => new Promise((r) => setTimeout(r, ms));
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
export class CronService {
|
|
|
|
|
|
constructor(private readonly deps: CronDeps) {}
|
2026-06-27 08:10:40 +05:30
|
|
|
|
|
|
|
|
|
|
private get store() {
|
|
|
|
|
|
return this.deps.store;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ───────────────────────────── Reads ─────────────────────────────
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
listJobs(): CronJob[] {
|
|
|
|
|
|
return Object.values(this.store.getCronJobs());
|
2026-06-27 08:10:40 +05:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
getJob(id: string): CronJob | null {
|
|
|
|
|
|
return this.store.getCronJob(id);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
listRuns(jobId?: string): CronJobRun[] {
|
|
|
|
|
|
const all = Object.values(this.store.getCronJobRuns());
|
|
|
|
|
|
const filtered = jobId ? all.filter((r) => r.cronJobId === jobId) : all;
|
2026-06-27 08:10:40 +05:30
|
|
|
|
return filtered.sort((a, b) => b.startedAt - a.startedAt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** Number of active sessions of a given agent type (for the multi-session warning). */
|
|
|
|
|
|
countActiveAgents(agentType: string): number {
|
|
|
|
|
|
let n = 0;
|
|
|
|
|
|
for (const s of this.deps.sessions.values()) if (s.mode === agentType) n++;
|
|
|
|
|
|
return n;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ──────────────────────────── Mutations ───────────────────────────
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
createJob(input: CronJobInput): CronJob {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
const now = Date.now();
|
2026-06-29 11:35:56 +05:30
|
|
|
|
const job: CronJob = {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
id: uuidv4(),
|
|
|
|
|
|
name: input.name,
|
|
|
|
|
|
agentType: input.agentType,
|
|
|
|
|
|
workingDir: input.workingDir,
|
|
|
|
|
|
launchCommand: input.launchCommand,
|
|
|
|
|
|
promptMode: input.promptMode,
|
|
|
|
|
|
promptText: input.promptText,
|
|
|
|
|
|
promptFilePath: input.promptFilePath,
|
|
|
|
|
|
inputMode: input.inputMode,
|
|
|
|
|
|
scheduleType: input.scheduleType,
|
|
|
|
|
|
runAt: input.runAt,
|
|
|
|
|
|
intervalMinutes: input.intervalMinutes,
|
|
|
|
|
|
dailyTime: input.dailyTime,
|
|
|
|
|
|
weeklyDays: input.weeklyDays,
|
|
|
|
|
|
weeklyTime: input.weeklyTime,
|
|
|
|
|
|
enabled: input.enabled,
|
|
|
|
|
|
notes: input.notes,
|
|
|
|
|
|
concurrencyPolicy: input.concurrencyPolicy,
|
|
|
|
|
|
createdAt: now,
|
|
|
|
|
|
updatedAt: now,
|
|
|
|
|
|
lastRunAt: null,
|
|
|
|
|
|
nextRunAt: null,
|
|
|
|
|
|
lastStatus: null,
|
|
|
|
|
|
lastDueKey: null,
|
|
|
|
|
|
};
|
|
|
|
|
|
job.nextRunAt = job.enabled ? computeNextRunAt(job, now) : null;
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJob(job.id, job);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.broadcastListChanged();
|
|
|
|
|
|
return job;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
updateJob(id: string, patch: Partial<CronJobInput>): CronJob | null {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
const existing = this.getJob(id);
|
|
|
|
|
|
if (!existing) return null;
|
|
|
|
|
|
const now = Date.now();
|
2026-06-29 11:35:56 +05:30
|
|
|
|
const updated: CronJob = {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
...existing,
|
|
|
|
|
|
...patch,
|
|
|
|
|
|
id: existing.id,
|
|
|
|
|
|
createdAt: existing.createdAt,
|
|
|
|
|
|
updatedAt: now,
|
|
|
|
|
|
// Editing a job re-arms it: clear the one-time completion + dup-guard so a
|
|
|
|
|
|
// changed schedule can fire again.
|
|
|
|
|
|
completedOnce: false,
|
|
|
|
|
|
lastDueKey: null,
|
|
|
|
|
|
};
|
|
|
|
|
|
updated.nextRunAt = updated.enabled ? computeNextRunAt(updated, now) : null;
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJob(updated.id, updated);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.broadcastListChanged();
|
|
|
|
|
|
return updated;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
setEnabled(id: string, enabled: boolean): CronJob | null {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
const existing = this.getJob(id);
|
|
|
|
|
|
if (!existing) return null;
|
|
|
|
|
|
const now = Date.now();
|
|
|
|
|
|
existing.enabled = enabled;
|
|
|
|
|
|
existing.updatedAt = now;
|
|
|
|
|
|
existing.nextRunAt = enabled ? computeNextRunAt(existing, now) : null;
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJob(existing.id, existing);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.broadcastListChanged();
|
|
|
|
|
|
return existing;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
deleteJob(id: string): boolean {
|
|
|
|
|
|
if (!this.getJob(id)) return false;
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.removeCronJob(id);
|
|
|
|
|
|
for (const run of this.listRuns(id)) this.store.removeCronJobRun(run.id);
|
|
|
|
|
|
this.deps.broadcast(SseEvent.CronJobDeleted, { id });
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.broadcastListChanged();
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ──────────────────────────── Execution ───────────────────────────
|
|
|
|
|
|
|
|
|
|
|
|
/** Manual Run Now — always launches regardless of schedule/enabled state. */
|
2026-06-29 11:35:56 +05:30
|
|
|
|
async runNow(id: string): Promise<CronJobRun | null> {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
const job = this.getJob(id);
|
|
|
|
|
|
if (!job) return null;
|
|
|
|
|
|
return this.launch(job, 'manual_run_now');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Background tick: launch every enabled job whose next run is due. Advances
|
|
|
|
|
|
* each job's schedule and guards against double-launching the same due time.
|
|
|
|
|
|
*/
|
|
|
|
|
|
async tickDueJobs(now: number = Date.now()): Promise<void> {
|
|
|
|
|
|
for (const job of this.listJobs()) {
|
|
|
|
|
|
if (!job.enabled || job.nextRunAt == null || job.nextRunAt > now) continue;
|
|
|
|
|
|
|
|
|
|
|
|
const key = dueKeyFor(job.id, job.nextRunAt);
|
|
|
|
|
|
if (job.lastDueKey === key) {
|
|
|
|
|
|
// This due time was already consumed (overlap/restart) — just advance.
|
|
|
|
|
|
this.advanceAfterFire(job, now);
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Optional concurrency policy for AUTOMATIC runs.
|
|
|
|
|
|
if (job.concurrencyPolicy === 'skip_if_same_agent_running' && this.countActiveAgents(job.agentType) > 0) {
|
|
|
|
|
|
job.lastDueKey = key;
|
|
|
|
|
|
this.advanceAfterFire(job, now);
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
job.lastDueKey = key;
|
|
|
|
|
|
// Advance the schedule BEFORE launching so a slow launch can't be
|
|
|
|
|
|
// re-triggered by the next tick.
|
|
|
|
|
|
this.advanceAfterFire(job, now);
|
|
|
|
|
|
this.launch(job, 'scheduled').catch((err) =>
|
2026-06-29 11:35:56 +05:30
|
|
|
|
console.error(`[cron] launch failed for job ${job.id}:`, getErrorMessage(err))
|
2026-06-27 08:10:40 +05:30
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** Recompute nextRunAt for loaded jobs on boot (e.g. after a restart). */
|
|
|
|
|
|
init(): void {
|
|
|
|
|
|
const now = Date.now();
|
|
|
|
|
|
for (const job of this.listJobs()) {
|
|
|
|
|
|
const isDeadOnce = job.scheduleType === 'once' && job.completedOnce;
|
|
|
|
|
|
if (job.enabled && job.nextRunAt == null && !isDeadOnce) {
|
|
|
|
|
|
job.nextRunAt = computeNextRunAt(job, now);
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJob(job.id, job);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ──────────────────────────── Internals ───────────────────────────
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
private advanceAfterFire(job: CronJob, now: number): void {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
if (job.scheduleType === 'once') {
|
|
|
|
|
|
job.completedOnce = true;
|
|
|
|
|
|
job.enabled = false;
|
|
|
|
|
|
job.nextRunAt = null;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
job.nextRunAt = computeNextRunAt(job, now);
|
|
|
|
|
|
}
|
|
|
|
|
|
job.updatedAt = now;
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJob(job.id, job);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.broadcastListChanged();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
private async launch(job: CronJob, trigger: TriggerType): Promise<CronJobRun> {
|
|
|
|
|
|
const run: CronJobRun = {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
id: uuidv4(),
|
2026-06-29 11:35:56 +05:30
|
|
|
|
cronJobId: job.id,
|
2026-06-27 08:10:40 +05:30
|
|
|
|
sessionId: null,
|
|
|
|
|
|
sessionName: null,
|
|
|
|
|
|
startedAt: Date.now(),
|
|
|
|
|
|
finishedAt: null,
|
|
|
|
|
|
status: 'created',
|
|
|
|
|
|
triggerType: trigger,
|
|
|
|
|
|
createdSessionUrl: null,
|
|
|
|
|
|
};
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJobRun(run.id, run);
|
|
|
|
|
|
this.deps.broadcast(SseEvent.CronRunCreated, run);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
|
|
|
|
|
|
// Resolve the prompt.
|
|
|
|
|
|
let prompt: string;
|
|
|
|
|
|
try {
|
|
|
|
|
|
prompt = await this.resolvePrompt(job);
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
return this.failRun(job, run, `Prompt error: ${getErrorMessage(err)}`);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Validate working directory.
|
|
|
|
|
|
try {
|
|
|
|
|
|
if (!statSync(job.workingDir).isDirectory()) {
|
|
|
|
|
|
return this.failRun(job, run, 'workingDir is not a directory');
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
return this.failRun(job, run, 'workingDir does not exist');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Respect the global session cap.
|
|
|
|
|
|
if (this.deps.sessions.size >= MAX_CONCURRENT_SESSIONS) {
|
|
|
|
|
|
return this.failRun(job, run, `Maximum concurrent sessions (${MAX_CONCURRENT_SESSIONS}) reached`);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Create + start the session (mirrors the quick-start route flow).
|
|
|
|
|
|
let session: Session;
|
|
|
|
|
|
try {
|
|
|
|
|
|
const mode = job.agentType;
|
|
|
|
|
|
const globalNice = await this.deps.getGlobalNiceConfig();
|
|
|
|
|
|
const modelConfig = await this.deps.getModelConfig();
|
|
|
|
|
|
const claudeModeConfig = await this.deps.getClaudeModeConfig();
|
|
|
|
|
|
const model = mode !== 'shell' ? modelConfig?.defaultModel || undefined : undefined;
|
|
|
|
|
|
session = new Session({
|
|
|
|
|
|
workingDir: job.workingDir,
|
|
|
|
|
|
mode,
|
|
|
|
|
|
name: job.name,
|
|
|
|
|
|
mux: this.deps.mux,
|
|
|
|
|
|
useMux: true,
|
|
|
|
|
|
niceConfig: globalNice,
|
|
|
|
|
|
model,
|
|
|
|
|
|
claudeMode: claudeModeConfig.claudeMode,
|
|
|
|
|
|
allowedTools: claudeModeConfig.allowedTools,
|
|
|
|
|
|
});
|
|
|
|
|
|
this.deps.addSession(session);
|
|
|
|
|
|
this.store.incrementSessionsCreated();
|
|
|
|
|
|
this.deps.persistSessionState(session);
|
|
|
|
|
|
await this.deps.setupSessionListeners(session);
|
|
|
|
|
|
this.deps.broadcast(SseEvent.SessionCreated, this.deps.getSessionStateWithRespawn(session));
|
|
|
|
|
|
if (mode === 'shell') {
|
|
|
|
|
|
await session.startShell();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
await session.startInteractive();
|
|
|
|
|
|
}
|
|
|
|
|
|
this.deps.broadcast(SseEvent.SessionInteractive, { id: session.id, mode });
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
return this.failRun(job, run, `Session launch failed: ${getErrorMessage(err)}`);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
run.sessionId = session.id;
|
|
|
|
|
|
run.sessionName = session.name;
|
|
|
|
|
|
run.createdSessionUrl = `/?session=${session.id}`;
|
|
|
|
|
|
run.status = 'session_started';
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJobRun(run.id, run);
|
|
|
|
|
|
this.deps.broadcast(SseEvent.CronRunUpdated, run);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.updateJobLastStatus(job.id, 'session_started');
|
|
|
|
|
|
|
|
|
|
|
|
// Send the prompt once the CLI is ready (async; does not block the caller).
|
|
|
|
|
|
this.sendPromptWhenReady(session.id, prompt, job, run);
|
|
|
|
|
|
return run;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
private async resolvePrompt(job: CronJob): Promise<string> {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
if (job.promptMode === 'prompt_file_path') {
|
|
|
|
|
|
if (!job.promptFilePath) throw new Error('prompt file path is empty');
|
|
|
|
|
|
return readFile(job.promptFilePath, 'utf-8');
|
|
|
|
|
|
}
|
|
|
|
|
|
return job.promptText ?? '';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
private sendPromptWhenReady(sessionId: string, prompt: string, job: CronJob, run: CronJobRun): void {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
setImmediate(() => {
|
|
|
|
|
|
const poll = async (): Promise<void> => {
|
|
|
|
|
|
if (job.agentType !== 'shell') {
|
2026-06-29 11:35:56 +05:30
|
|
|
|
for (let attempt = 0; attempt < CRON_READY_MAX_ATTEMPTS; attempt++) {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
await delay(500);
|
|
|
|
|
|
const s = this.deps.sessions.get(sessionId);
|
|
|
|
|
|
if (!s) return; // session was removed
|
|
|
|
|
|
const buf = s.getTerminalBuffer().slice(-2048);
|
|
|
|
|
|
if (buf.includes('❯') || buf.includes('tokens')) break;
|
|
|
|
|
|
}
|
2026-06-29 11:35:56 +05:30
|
|
|
|
await delay(CRON_READY_SETTLE_MS);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
} else {
|
|
|
|
|
|
await delay(1000);
|
|
|
|
|
|
}
|
|
|
|
|
|
const s = this.deps.sessions.get(sessionId);
|
|
|
|
|
|
if (!s) return;
|
|
|
|
|
|
try {
|
|
|
|
|
|
const payload = prompt.endsWith('\r') ? prompt : `${prompt}\r`;
|
|
|
|
|
|
if (job.inputMode === 'paste') {
|
|
|
|
|
|
s.write(payload);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
await s.writeViaMux(payload);
|
|
|
|
|
|
}
|
|
|
|
|
|
run.status = 'prompt_sent';
|
|
|
|
|
|
run.finishedAt = Date.now();
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJobRun(run.id, run);
|
|
|
|
|
|
this.deps.broadcast(SseEvent.CronRunUpdated, run);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.updateJobLastStatus(job.id, 'prompt_sent');
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
this.failRun(job, run, `Failed to send prompt: ${getErrorMessage(err)}`);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
2026-06-29 11:35:56 +05:30
|
|
|
|
poll().catch((err) => console.error('[cron] sendPromptWhenReady error:', getErrorMessage(err)));
|
2026-06-27 08:10:40 +05:30
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
private failRun(job: CronJob, run: CronJobRun, message: string): CronJobRun {
|
2026-06-27 08:10:40 +05:30
|
|
|
|
run.status = 'failed';
|
|
|
|
|
|
run.errorMessage = message;
|
|
|
|
|
|
run.finishedAt = Date.now();
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJobRun(run.id, run);
|
|
|
|
|
|
this.deps.broadcast(SseEvent.CronRunUpdated, run);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.updateJobLastStatus(job.id, 'failed');
|
|
|
|
|
|
return run;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
|
private updateJobLastStatus(jobId: string, status: CronJobRunStatus): void {
|
|
|
|
|
|
const fresh = this.store.getCronJob(jobId);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
if (!fresh) return;
|
|
|
|
|
|
const now = Date.now();
|
|
|
|
|
|
fresh.lastStatus = status;
|
|
|
|
|
|
fresh.lastRunAt = now;
|
|
|
|
|
|
fresh.updatedAt = now;
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.store.setCronJob(fresh.id, fresh);
|
2026-06-27 08:10:40 +05:30
|
|
|
|
this.broadcastListChanged();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private broadcastListChanged(): void {
|
2026-06-29 11:35:56 +05:30
|
|
|
|
this.deps.broadcast(SseEvent.CronJobsChanged, { jobs: this.listJobs() });
|
2026-06-27 08:10:40 +05:30
|
|
|
|
}
|
|
|
|
|
|
}
|