查看此和这问题.默认情况下,不支持暂停和恢复ScheduledExecutorService
,可以将其停止.您必须处理任务的安排.
Look at this and this questions. By default there is no support to pause and resume a ScheduledExecutorService
, it just can be stopped. You have to play with the scheduling of the tasks.