crontab 每月最后一天 0 8 28-31 * * [ `date -d tomorrow +%e` -eq 1 ] && do-something 我觉得能想到这种方法的,都是经验丰富的人。程序员们,想当然的就会就写出很复杂的代码。