mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-30 11:46:36 +08:00
16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
import { api } from './client'
|
|
|
|
export interface JobStatus {
|
|
name: string
|
|
interval: string
|
|
last_run?: string
|
|
last_err?: string
|
|
running?: boolean
|
|
started_at?: string
|
|
}
|
|
|
|
export const schedulerAPI = {
|
|
status: () => api.get<{ jobs: JobStatus[] }>('/admin/scheduler').then((r) => r.data.jobs),
|
|
run: (name: string) => api.post(`/admin/scheduler/${name}/run`).then((r) => r.data),
|
|
}
|