fix(crawler): 修复 cron 表达式工作日限制(1-5),改为每天执行
- 生产 DB: 中电建 0 8 * * 1-5 → 0 8 * * * (每天早8点,含周末) - 生产 DB: 新矿 5 8 * * 1-5 → 5 8 * * * (每天早8:05,含周末) - 生产 DB: 重激活新矿采集器(paused→active) - seed.ts: 同步修正, 避免未来 db:init 再次写入 1-5 - PM2 已重启使新 cron 生效 说明: 1-5 = 周一至周五, 去掉后变为每天执行。 用户可在前端「采集器配置」下拉框自由切换: 每4小时 / 每6小时 / 每天早8点/晚7点 / 手动
This commit is contained in:
parent
68f6fc5c16
commit
1dfe5ede67
@ -120,8 +120,8 @@ async function main() {
|
|||||||
await prisma.crawlerConfig.deleteMany()
|
await prisma.crawlerConfig.deleteMany()
|
||||||
await prisma.crawlerConfig.createMany({
|
await prisma.crawlerConfig.createMany({
|
||||||
data: [
|
data: [
|
||||||
{ name: '中国电建阳光采购网', targetUrl: 'https://bid.powerchina.cn', type: 'bid_powerchina', sourceName: '中电建', status: 'active', schedule: '0 8 * * 1-5', totalRuns: 286, successRuns: 275, failedRuns: 11, keywords: '["电缆","防火门","配电箱","钢材"]' },
|
{ name: '中国电建阳光采购网', targetUrl: 'https://bid.powerchina.cn', type: 'bid_powerchina', sourceName: '中电建', status: 'active', schedule: '0 8 * * *', totalRuns: 286, successRuns: 275, failedRuns: 11, keywords: '["电缆","防火门","配电箱","钢材"]' },
|
||||||
{ name: '新矿集团供应链平台', targetUrl: 'https://xkgroup.kdcloud.com', type: 'bid_xkgroup', sourceName: '新矿集团', scriptPath: 'fetch-xkgroup.py', status: 'active', schedule: '5 8 * * 1-5', totalRuns: 142, successRuns: 138, failedRuns: 4, keywords: '["电缆","钢材","阀门","管材"]' },
|
{ name: '新矿集团供应链平台', targetUrl: 'https://xkgroup.kdcloud.com', type: 'bid_xkgroup', sourceName: '新矿集团', scriptPath: 'fetch-xkgroup.py', status: 'active', schedule: '5 8 * * *', totalRuns: 142, successRuns: 138, failedRuns: 4, keywords: '["电缆","钢材","阀门","管材"]' },
|
||||||
{ name: '中核集团电子采购平台', targetUrl: 'https://www.cnncecp.com', type: 'bid_cnncecp', sourceName: '中核集团', scriptPath: 'fetch-cnncecp.py', status: 'paused', totalRuns: 0, successRuns: 0, failedRuns: 0, keywords: '["电缆","防火门","钢材","阀门"]' },
|
{ name: '中核集团电子采购平台', targetUrl: 'https://www.cnncecp.com', type: 'bid_cnncecp', sourceName: '中核集团', scriptPath: 'fetch-cnncecp.py', status: 'paused', totalRuns: 0, successRuns: 0, failedRuns: 0, keywords: '["电缆","防火门","钢材","阀门"]' },
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user