Guest User

Untitled

a guest
May 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. @RequestMapping(value = "execute", method = RequestMethod.POST, produces = {MediaType.APPLICATION_JSON_VALUE})
  2. @ResponseBody
  3. public void executeTimerTask(@RequestParam("task") String task) {
  4.  
  5. new java.util.Timer().schedule(new java.util.TimerTask() {
  6. @Override
  7. public void run() {
  8. System.out.println("task: " + task);
  9. }
  10. }, 10 * 1000);
  11. }
Add Comment
Please, Sign In to add comment