Java timed Tasks

Source: Internet
Author: User

1  PackageCom.financial.server.util;2 ImportJava.text.SimpleDateFormat;3 Importjava.util.Date;4 ImportJava.util.HashMap;5 ImportJava.util.Map;6 Importorg.springframework.beans.factory.annotation.Autowired;7 Importorg.springframework.scheduling.annotation.Scheduled;8 Importorg.springframework.stereotype.Component;9 Ten ImportCom.financial.server.service.impl.GSXQ_K_LineOfDayService; One ImportCom.financial.server.service.impl.GSYJReportService; A ImportCom.financial.server.service.impl.HGYJReportService; - ImportCom.financial.server.service.impl.HYYYReportService; - ImportCom.financial.server.service.impl.JuChaoServiceImpl; the ImportCom.financial.server.service.impl.LongHuBangDetailsService; - ImportCom.financial.server.service.impl.QSCHReportService; - ImportCom.financial.server.service.impl.SHZQService; - ImportCom.financial.server.service.impl.SZZQService; + ImportCom.financial.server.service.impl.TZCLReportService; - ImportCom.financial.server.service.impl.TaoGuBaService; + ImportCom.financial.server.service.impl.XGYBReportService; A ImportCom.financial.server.thread.GSYJThread; at ImportCom.financial.server.thread.HGYJThread; - ImportCom.financial.server.thread.HYYYThread; - ImportCom.financial.server.thread.JuChaoDownloadThread; - ImportCom.financial.server.thread.KOfDayThread; - ImportCom.financial.server.thread.LongHuBangDetailsThread; - ImportCom.financial.server.thread.QSCHThread; in ImportCom.financial.server.thread.SHZQThread; - ImportCom.financial.server.thread.SZZQThread; to ImportCom.financial.server.thread.TGBThread; + ImportCom.financial.server.thread.TZCLThread; - ImportCom.financial.server.thread.XGYBThread; the  *  $ @ComponentPanax Notoginseng  Public classTimerTask { - @Autowired the     PrivateGsxq_k_lineofdayservice Kofdayservice; +      A      the @Autowired +     PrivateJuchaoserviceimpl Juchaoserviceimpl; -      $ @Autowired $     PrivateTaogubaservice Taogubaservice; -      - @Autowired the     PrivateGsyjreportservice Gsyjreportservice; - @AutowiredWuyi     PrivateXgybreportservice Xgybreportservice; the @Autowired -     PrivateHyyyreportservice Hyyyreportservice; Wu     /*@Autowired - private Gnybreportservice Gnybreportservice;*/ About @Autowired $     PrivateTzclreportservice Tzclreportservice; - @Autowired -     PrivateQschreportservice Qschreportservice; - @Autowired A     PrivateHgyjreportservice Hgyjreportservice; +      the @Autowired -     PrivateLonghubangdetailsservice Longhubangdetailsservice; $      the @Autowired the     PrivateJuchaoserviceimpl Juchchaoserviceimpl; the @Autowired the     PrivateGsxq_k_lineofdayservice Gsxq_k_lineofdayservice; -      inString date =NewSimpleDateFormat ("Yyyy-mm-dd"). Format (NewDate ());// the     //String date = "2018-07-12"; theString typefile = "f:/giant tide net/giant Tide NET announcement category. txt"; About@Scheduled (cron = "0 59 13?") * *")//once daily 15:04 the      Public voidDosomethingwithcron () { the         Try { the               +               -              the             //Insert ThreadBayi             /*map<string, string> Map = taoguba.webparsehtmls ("https://www.taoguba.com.cn/index?blockID=1"); the String Jessionid = Map.get ("Jsessionid"). toString (); the String cookie = taoguba.submitpost (Jessionid); - New Thread (New Tgbthread (Taogubaservice, date, date,true)). Start ();//Amoy Stock Bar - */             the             NewThread (NewGsyjthread (Gsyjreportservice, date, date,true). Start ();//Company Research the              the             NewThread (NewXgybthread (Xgybreportservice, date, date,true). Start ();//IPO Research Report the              -             NewThread (NewHyyythread (Hyyyreportservice, date, date,true). Start ();//Industry Research the              the             NewThread (NewTzclthread (Tzclreportservice, date, date,true). Start ();//Investment Strategy the             94             NewThread (NewQschthread (Qschreportservice, date, date,true). Start ();//Brokerage Morning Meeting the              the             NewThread (NewHgyjthread (Hgyjreportservice, date, date,true). Start ();//Macro Research the             98            NewThread (NewLonghubangdetailsthread (Longhubangdetailsservice, date, date,true). Start ();//Billboard details About              -             101             NewThread (NewJuchaothread (juchchaoserviceimpl,typefile,date, date,true). Start ();//Bulletin of Giant Tide net102             103             104             NewThread (NewKofdaythread (Gsxq_k_lineofdayservice,date,true). Start ();//Daily K-line data the             106              107             108}Catch(Exception e) {109 e.printstacktrace (); the         } 111     }   the   113}
View Code

Java timed Tasks

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.