Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hubin
long-tern-care-service
Commits
7f85d3ba
Commit
7f85d3ba
authored
Mar 10, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时test
parent
bef35c63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
SrvTaskScheduledController.java
...ltc/governance/controller/SrvTaskScheduledController.java
+3
-7
ScheduledTask.java
...c/main/java/com/hungraim/ltc/component/ScheduledTask.java
+28
-0
No files found.
governance/src/main/java/com/hungraim/ltc/governance/controller/SrvTaskScheduledController.java
View file @
7f85d3ba
...
@@ -21,20 +21,16 @@ public class SrvTaskScheduledController {
...
@@ -21,20 +21,16 @@ public class SrvTaskScheduledController {
@Autowired
@Autowired
private
SrvTaskService
srvTaskService
;
private
SrvTaskService
srvTaskService
;
@Scheduled
(
cron
=
"
30 59 2
1 * * ?"
)
@Scheduled
(
cron
=
"
0 10 1
1 * * ?"
)
public
void
timeAllocationSrvTask
()
{
public
void
timeAllocationSrvTask
()
{
log
.
info
(
"timeAllocationSrvTask========start"
);
log
.
info
(
"timeAllocationSrvTask========start"
);
srvTaskService
.
timeAllocationSrvTask
();
srvTaskService
.
timeAllocationSrvTask
();
log
.
info
(
"timeAllocationSrvTask========end:{}"
);
log
.
info
(
"timeAllocationSrvTask========end:{}"
);
}
}
@Scheduled
(
cron
=
"
30 45 21
* * ?"
)
@Scheduled
(
cron
=
"
*/5 * *
* * ?"
)
public
void
test111
()
{
public
void
test111
()
{
log
.
info
(
"timeAllocationSrvTask========start"
);
log
.
info
(
"test111==============================================="
);
srvTaskService
.
timeAllocationSrvTask
();
log
.
info
(
"timeAllocationSrvTask========end:{}"
);
}
}
}
}
system/system-admin-service/src/main/java/com/hungraim/ltc/component/ScheduledTask.java
0 → 100644
View file @
7f85d3ba
package
com
.
hungraim
.
ltc
.
component
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
/**
* @author zwl
* @ClassName ScheduledTask
* @description
* @date 2023/3/10 10:49
**/
@Component
@Slf4j
public
class
ScheduledTask
{
@Scheduled
(
cron
=
"0 05 11 * * ?"
)
public
void
ScheduledTaskSystem
()
{
log
.
info
(
"ScheduledTaskSystem========start==========="
);
}
@Scheduled
(
cron
=
"0 * /1 * * * ?"
)
public
void
test111
()
{
log
.
info
(
"test111==============================================="
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment