Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
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
platform
hg-smart
Commits
49e55a63
Commit
49e55a63
authored
Oct 12, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.定时清理zip文件
parent
6dc8f3c1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
HggpApplication.java
src/main/java/com/baosight/hggp/HggpApplication.java
+0
-1
ClearZipJob.java
src/main/java/com/baosight/hggp/job/ClearZipJob.java
+5
-2
No files found.
src/main/java/com/baosight/hggp/HggpApplication.java
View file @
49e55a63
...
@@ -13,7 +13,6 @@ import org.springframework.context.annotation.ImportResource;
...
@@ -13,7 +13,6 @@ import org.springframework.context.annotation.ImportResource;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.web.multipart.commons.CommonsMultipartResolver
;
import
org.springframework.web.multipart.commons.CommonsMultipartResolver
;
@EnableScheduling
@SpringBootApplication
(
scanBasePackages
=
"com.baosight"
)
@SpringBootApplication
(
scanBasePackages
=
"com.baosight"
)
@ServletComponentScan
(
"com.baosight.iplat4j.core.web.servlet"
)
@ServletComponentScan
(
"com.baosight.iplat4j.core.web.servlet"
)
@ImportResource
(
locations
=
{
"classpath*:spring/framework/platApplicationContext*.xml"
,
@ImportResource
(
locations
=
{
"classpath*:spring/framework/platApplicationContext*.xml"
,
...
...
src/main/java/com/baosight/hggp/job/ClearZipJob.java
View file @
49e55a63
...
@@ -4,6 +4,8 @@ import com.baosight.hggp.core.constant.OSConstant;
...
@@ -4,6 +4,8 @@ import com.baosight.hggp.core.constant.OSConstant;
import
com.baosight.hggp.util.DateUtil
;
import
com.baosight.hggp.util.DateUtil
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.hggp.util.FileUtils
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -17,13 +19,14 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -17,13 +19,14 @@ import lombok.extern.slf4j.Slf4j;
* @date:2024/10/11,12:26
* @date:2024/10/11,12:26
*/
*/
@Slf4j
@Slf4j
@Component
@Configuration
@EnableScheduling
public
class
ClearZipJob
{
public
class
ClearZipJob
{
/**
/**
* 清理ZIP文件
* 清理ZIP文件
*/
*/
@Scheduled
(
cron
=
"0
15 3 * * ?
"
)
@Scheduled
(
cron
=
"0
45 0/3 * * ?
"
)
public
void
clearZipFile
()
{
public
void
clearZipFile
()
{
try
{
try
{
File
zipFolder
=
new
File
(
OSConstant
.
ZIP_DIR
);
File
zipFolder
=
new
File
(
OSConstant
.
ZIP_DIR
);
...
...
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