19e22268d2d723068290c94460dd87a005d42271.svn-base 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.sinosoft.lz.webservice.service;
  2. import java.util.Date;
  3. import org.apache.commons.logging.Log;
  4. import org.apache.commons.logging.LogFactory;
  5. import org.quartz.JobExecutionContext;
  6. import org.quartz.JobExecutionException;
  7. import org.springframework.scheduling.quartz.QuartzJobBean;
  8. import org.springframework.stereotype.Service;
  9. /**
  10. *
  11. *@filename SOETaskImpl.java
  12. *@author liuyuliang
  13. *@date 2014-6-24
  14. */
  15. @Service("iSOETask")
  16. public class SOETaskImpl extends QuartzJobBean{
  17. private static Log log = LogFactory.getLog(SOETaskImpl.class);
  18. // TODO Auto-generated method stub
  19. private static int counter = 0;
  20. protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
  21. System.out.println();
  22. long ms = System.currentTimeMillis();
  23. System.out.println("\t\t" + new Date(ms));
  24. System.out.println(ms);
  25. System.out.println("(" + counter++ + ")");
  26. String s = (String) context.getMergedJobDataMap().get("service");
  27. System.out.println(s);
  28. System.out.println();
  29. // log.info("11111111111111111111");
  30. // MessagePushService.showMsg("防风防汛-F-2015-0905");
  31. }
  32. }