-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from TeamHARA/feat/scheduler
[FEAT] 지정된 시간에 푸시알림 보내기
- Loading branch information
Showing
11 changed files
with
321 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import cron from 'node-cron'; | ||
import alarmController from '../controller/alarmController'; | ||
|
||
const option = { | ||
scheduled: true, | ||
timezone: "Asia/Seoul" | ||
} | ||
// 데드라인 3일 전 + 고민 작성 30일 후 : 오후 8시 | ||
const deadline_alarm_1 = cron.schedule('00 20 * * *', alarmController.setBeforeDeadlineAlarm, option); | ||
const deadline_alarm_2 = cron.schedule('00 20 * * *', alarmController.setNoDeadlineAlarm, option); | ||
|
||
|
||
// 데드라인 당일 알람 : 낮 12시 | ||
const deadline_alarm_3 = cron.schedule('00 12 * * *', alarmController.setOnDeadlineAlarm, option); | ||
|
||
export default{ | ||
deadline_alarm_1, | ||
deadline_alarm_2, | ||
deadline_alarm_3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.