一键导入
blink-queue
Background task queue and cron schedules. Enqueue tasks, named FIFO queues with parallelism, auto-retry. Requires Blink Backend (Pro+).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Background task queue and cron schedules. Enqueue tasks, named FIFO queues with parallelism, auto-retry. Requires Blink Backend (Pro+).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
OAuth connector system for 38+ third-party services. Execute API calls to Google, Notion, Slack, Discord, GitHub, Stripe, Jira, HubSpot, Salesforce, LinkedIn, and more.
End-to-end guide for building and shipping a Blink app. Project setup, SDK init, auth, database, backend, deploy, and custom domains. Index to all other skills.
Authentication with managed and headless modes. Social providers, email/password, magic links, RBAC.
Build and deploy Blink apps to production. Preview vs production deploys, deploy pipeline, static site hosting.
Blink Claw agent management — managed AI agent hosting on Fly.io. List agents, check status, manage secrets. For autonomous agents, Telegram/Discord bots, and scheduled workflows.
AI Gateway for text generation, image generation/editing, video generation, text-to-speech, audio transcription, and AI phone calls. Unified access to 50+ models.
基于 SOC 职业分类
| name | blink-queue |
| description | Background task queue and cron schedules. Enqueue tasks, named FIFO queues with parallelism, auto-retry. Requires Blink Backend (Pro+). |
blink_queue_enqueue · blink_queue_schedule · blink_queue_list · blink_queue_stats · blink_queue_cancel · blink_queue_get · blink_queue_dlq_retry · blink_queue_create_queue
# Check backend is deployed (required for queue delivery)
blink backend status
# Enqueue a task
blink queue enqueue send-welcome-email --payload '{"to":"user@example.com"}'
# Create a cron schedule
blink queue schedule create daily-digest "0 9 * * *" --payload '{"reportType":"daily"}'
# List tasks
blink queue list --status pending
# View stats
blink queue stats
Min SDK: @blinkdotnew/sdk >= 2.5.0
POST /api/queue to backend/index.ts BEFORE enqueueingname as taskNameblink backend deploybackend/index.tsapp.post('/api/queue', async (c) => {
const { taskName, payload } = await c.req.json()
switch (taskName) {
case 'send-welcome-email':
await sendEmail(payload.to, payload.displayName)
return c.json({ ok: true })
case 'daily-digest':
await generateDigest(payload.reportType)
return c.json({ ok: true })
default:
return c.json({ error: `Unknown task: ${taskName}` }, 400)
}
})
Payload by source:
| Source | Delivered body |
|---|---|
blink.queue.enqueue(taskName, payload) | { taskName, taskId, payload } |
blink.queue.schedule(name, cron, payload) | { taskName: name, payload } (no taskId) |
blink backend deploy
blink queue enqueue send-welcome-email --payload '{"to":"user@example.com"}' --queue emails --delay 10s
// Enqueue
await blink.queue.enqueue('send-welcome-email', { to: 'user@example.com' })
await blink.queue.enqueue('send-welcome-email', { to: 'user@example.com' }, {
queue: 'emails', delay: '5m', retries: 3,
})
// Schedule — name IS the taskName
await blink.queue.schedule('daily-digest', '0 9 * * *', { type: 'daily' })
await blink.queue.schedule('daily-digest', '0 9 * * *', { type: 'daily' }, {
timezone: 'America/New_York',
})
// Manage schedules
await blink.queue.pauseSchedule('daily-digest')
await blink.queue.resumeSchedule('daily-digest')
await blink.queue.deleteSchedule('daily-digest')
// Named queues (create once, idempotent)
await blink.queue.createQueue('emails', { parallelism: 10 })
// Inspect & manage
const tasks = await blink.queue.list({ status: 'pending', queue: 'emails' })
await blink.queue.cancel(taskId)
const dead = await blink.queue.listDead()
await blink.queue.retryDead(taskId)
const stats = await blink.queue.stats()
| Cron | When |
|---|---|
0 9 * * * | Daily at 9am |
0 * * * * | Every hour |
*/15 * * * * | Every 15 minutes |
0 9 * * 1 | Every Monday at 9am |
| Error | Cause | Fix |
|---|---|---|
| Tasks not delivering | Backend not deployed | blink backend deploy |
Unknown task: X | Missing case in handler | Add matching case |
| Tasks retrying | Handler returning non-2xx | Return c.json({ ok: true }) |
cancel returns 409 | Task not pending | Can only cancel 'pending' tasks |
1 credit = 1,000 tasks (0.001 credits/task). Retries and reads are free. Pro+ only.