Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/paralect/hive --skill hive-scheduler명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | hive-scheduler |
| description | How to create scheduled jobs in Hive framework |
| globs | ["src/scheduler/handlers/*.js"] |
| alwaysApply | false |
Background jobs on cron schedules.
Location: /src/scheduler/handlers/{jobName}.js
import db from 'db';
export const handler = async () => {
// Job logic
};
export const cron = '0 * * * *'; // Every hour
┌─ minute (0-59)
│ ┌─ hour (0-23)
│ │ ┌─ day of month (1-31)
│ │ │ ┌─ month (1-12)
│ │ │ │ ┌─ day of week (0-6)
* * * * *
| Pattern | Schedule |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour |
0 */12 * * * | Every 12 hours |
0 0 * * * | Daily at midnight |
0 9 * * 1 | Mondays at 9am |
Sync external data:
import db from 'db';
import moment from 'moment';
import externalApi from 'services/externalApi';
export const handler = async () => {
const items = await externalApi.list({
updatedSince: moment().subtract(5, 'minutes').toDate(),
});
for (const item of items) {
await db.services.items.updateOne(
{ externalId: item.id },
(doc) => ({ ...doc, ...item })
);
}
};
export const cron = '*/5 * * * *';
Mark overdue:
import db from 'db';
import moment from 'moment';
export const handler = async () => {
await db.services.invoices.updateMany(
{
isPaid: { $ne: true },
isDue: { $ne: true },
dueOn: { $lt: new Date() },
},
(doc) => ({ ...doc, isDue: true })
);
};
export const cron = '0 */12 * * *';
handler and cron