Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping(value = "execute", method = RequestMethod.POST, produces = {MediaType.APPLICATION_JSON_VALUE})
- @ResponseBody
- public void executeTimerTask(@RequestParam("task") String task) {
- new java.util.Timer().schedule(new java.util.TimerTask() {
- @Override
- public void run() {
- System.out.println("task: " + task);
- }
- }, 10 * 1000);
- }
Add Comment
Please, Sign In to add comment