Skip to main content
Glama

MCP Server.exe

by shadowcz007
scheduler.ts982 B
import * as cron from 'node-cron' import { TaskConfig } from '../config' import { executeOperation } from '../core/operations' import { sendNotify } from '../notify/index' export function scheduleTask (task: TaskConfig, client: any) { // 需要立即执行一次 const run = async () => { try { // 执行操作并收集结果 const results = [] for (const operation of task.operations) { try { const result = await executeOperation(client, operation) results.push({ operation, result }) } catch (opErr) { results.push({ operation, error: opErr.message }) } } // 发送通知 await sendNotify(task.notify, results) } catch (err) { console.error('任务执行失败:', err) // 发送错误通知 await sendNotify(task.notify, { error: err.message }) } } // 立即执行一次 run() cron.schedule(task.schedule, async () => { await run() }) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shadowcz007/mcp_server_exe'

If you have feedback or need assistance with the MCP directory API, please join our Discord server