Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WebBack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
websystem
WebBack
Merge requests
!7
[
#6
] Schedule 컨트롤러, 라우터, 로직 개발
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[
#6
] Schedule 컨트롤러, 라우터, 로직 개발
feature/#6
into
develop
Overview
0
Commits
12
Pipelines
0
Changes
2
Merged
조대희
requested to merge
feature/#6
into
develop
6 months ago
Overview
0
Commits
12
Pipelines
0
Changes
2
Expand
컨트롤러 생성
라우터 생성
유틸 함수 생성
Schedule 모델 컬럼 추가
Schedule 서비스 버그 수정
0
0
Merge request reports
Viewing commit
f997bd99
Prev
Next
Show latest version
2 files
+
22
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
f997bd99
feat: 유동 스케줄 자동 삭제 유틸 함수 추가 (
#6
)
· f997bd99
조대희
authored
6 months ago
utils/scheduler.js
0 → 100644
+
19
−
0
Options
const
cron
=
require
(
'
node-cron
'
);
const
scheduleService
=
require
(
'
../services/scheduleService
'
);
// 매주 월요일 자정에 유동 스케줄 삭제하기
const
initScheduleCleaner
=
()
=>
{
cron
.
schedule
(
'
0 0 * * 1
'
,
async
()
=>
{
try
{
await
scheduleService
.
cleanExpiredSchedules
();
}
catch
(
error
)
{
console
.
error
(
'
Failed to clean expired schedules:
'
,
error
);
}
},
{
timezone
:
"
Asia/Seoul
"
});
};
module
.
exports
=
{
initScheduleCleaner
};
\ No newline at end of file
Loading