MCPcopy Create free account
hub / github.com/MagicCube/agentara / useScheduledTaskUpdate

Function useScheduledTaskUpdate

web/src/lib/api/hooks.ts:175–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173 * Updates a scheduled task by scheduler ID.
174 */
175export function useScheduledTaskUpdate() {
176 const queryClient = useQueryClient();
177 return useMutation({
178 mutationFn: ({
179 schedulerId,
180 ...body
181 }: ScheduledTaskUpdatePayload & { schedulerId: string }) =>
182 apiFetch(`/cronjobs/${schedulerId}`, {
183 method: "PUT",
184 body: JSON.stringify(body),
185 }),
186 onSuccess: () => {
187 void queryClient.invalidateQueries({ queryKey: ["scheduled-tasks"] });
188 },
189 });
190}
191
192// --- Skills ---
193

Callers

nothing calls this directly

Calls 1

apiFetchFunction · 0.90

Tested by

no test coverage detected