//매 시간 00분에 실행 : 만료된 요금제 업데이트
cron.schedule('0 * * * *', async () => {
console.log('[Scheduler] Running expiration check...');
await updateExpiredPlans();
});
//매일 00:00 시에 실행 : 이메일 발송
cron.schedule("0 0 * * *", async () => {
console.log("🔔 Running scheduled payment reminder check...");
await sendPaymentReminderEmails();
});
//매일 01:00 시에 실행 : 자동 결제
cron.schedule("0 1 * * *", async () => {
console.log("🔄 자동 결제 실행 중...");
await processAutoPayments();
});
JavaScript
복사
hooks 연동
•
pg 심사 끝나고 바로 진행할 예정
