我必须编写一个每周运行一次的 spring 调度程序,比如每周一凌晨 1 点。它的 cron 表达式是什么,我们可以使用 fixedDely 来归档它。
最佳答案
您可以为此使用 cron:
@Scheduled(cron = "0 0 1 * * MON")
cron 表达式从左到右的顺序是:
second, minute, hour, day of month, month, day(s) of week
关于spring Scheduler - 每周运行一次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50296823/