Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangyingyang
2024-12-03 15:59:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9796a46b2854a448db0cf133a78670d82d88d09f
9796a46b
1 parent
b3b6bc2f
fix
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
22 deletions
src/main/java/com/infoloop/tianting/task/ScheduledTask.java
src/main/java/com/infoloop/tianting/task/ScheduledTask.java
deleted
100644 → 0
View file @
b3b6bc2
package
com
.
infoloop
.
tianting
.
task
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
@Component
@EnableScheduling
public
class
ScheduledTask
{
// 每5秒执行一次的定时任务
// @Scheduled(fixedRate = 5000)
// public void task1() {
// System.out.println("定时任务1:每5秒执行一次,当前时间:" + System.currentTimeMillis());
// }
// 每天凌晨2点执行一次的定时任务
@Scheduled
(
cron
=
"0 0 2 * * *"
)
public
void
taskForUpdateOrderStatus
()
{
System
.
out
.
println
(
"定时任务2:每天凌晨2点执行一次,当前时间:"
+
System
.
currentTimeMillis
());
}
}
\ No newline at end of file
Please
register
or
login
to post a comment