Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiboDomain
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
xuyimeng
weiboDomain
Commits
157f295d
Commit
157f295d
authored
Mar 14, 2018
by
chenweitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加md说明
parent
0af9815d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
README.md
+21
-2
No files found.
README.md
View file @
157f295d
...
@@ -5,7 +5,25 @@
...
@@ -5,7 +5,25 @@
采集地址:https://d.weibo.com/1087030002_417#
采集地址:https://d.weibo.com/1087030002_417#
> 使用quartz定时器,所以主方法中仅初始化spring容器
> 使用quartz定时器,所以主方法中仅初始化spring容器
> 定时器程序入口在 com.zhiweidata.weiboDomain.quartz
> package com.zhiweidata.weiboDomain.start;
> public static void main(String[] args) {
> ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
>
> System.out.println("微博热门榜单采集开始...");
> //程序主体切换至com.zhiweidata.weiboDomain.quartz定时器
>
> }
> 定时器程序入口在 com.zhiweidata.weiboDomain.quartz
>
> @Scheduled(cron = "0 0 20 * * *")
> public void execute() {
> String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd
> HH"));
> long start = System.currentTimeMillis();
> String cookie = "";
> serice.crawlerData(cookie);
> long end = System.currentTimeMillis();
> log.info(time + "次运行耗时:" + (end - start) + "\t毫秒");
> }
\ No newline at end of file
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