| | |
| | | @Resource |
| | | private QuartzUtil quartzUtil; |
| | | |
| | | @Override |
| | | public void execute(JobExecutionContext jobExecutionContext){ |
| | | run(jobExecutionContext); |
| | | } |
| | | |
| | | /** |
| | | * 执行的业务逻辑 |
| | |
| | | public void run() { |
| | | try { |
| | | // 使用Runtime执行命令 |
| | | Process process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName); |
| | | Process process = Runtime.getRuntime().exec("sudo rm -rf /data/nginx/html/files/audio/" + fileName); |
| | | // 读取命令的输出 |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); |
| | | String line; |
| | |
| | | System.err.println(jsonObject1.getString("msg")); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void execute(JobExecutionContext jobExecutionContext){ |
| | | run(jobExecutionContext); |
| | | } |
| | | |
| | | |