package cc.mrbird.febs.restart;
|
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
import java.io.IOException;
|
|
@Slf4j
|
@Component
|
public class RestartJob {
|
@Scheduled(cron = "0 40 * * * ? ")
|
public void autoRestart() throws IOException {
|
String shellpath="sh /home/javaweb/cron/reset-mall-rabbit.sh";
|
Process ps = Runtime.getRuntime().exec(shellpath);
|
}
|
}
|