我有一个服务器(debian ),它有时会提示以下消息(在启动/重新启动计算机之后):
The system is going down on <time in past>
运行shutdown -c会导致:
Cannot find pid of running shutdown.
由于这个问题,普通用户不能再登录,只有根访问是可能的。
有人看到这个问题了吗?还是有人给我提了个建议?谢谢。
我的代码:
ScheduledServiceExecutor service = Executors.newSingleThreadScheduledExecutor();
ScheduledFuture future = service.scheduleWithFixedDelay(
runnable, 1, 1, TimeUnit.MILLISECONDS
);
// ...
// now it's time to shut it all down
future.cancel(true);
service.shutdown();
我说对了吗?也许我应该这么做:
service.