A tiny tool that waits until a given cron expression would trigger, and then just exits. If multiple expressions are given, it waits until the first (earliest) match.
$ ${APP} "*/5 * * * *"
[${APP}] 2020/07/10 11:59:29.965045 waiting 30.035156s until next match (2020-07-10T12:00:00+02:00) of cron expression ["*/5 * * * *"]
[${APP}] 2020/07/10 12:00:00.966919 done
$ ${APP} -print-next-match-and-exit "*/3 * * * *"
2020-07-10T12:48:00+02:00
$ ${APP} -print-delta-and-exit "@hourly"
3308.674034
Using go get:
go get -u github.com/keilerkonzept/${APP}
Or download the binary for your platform from the releases page.
${APP} [OPTIONS] [CRON_EXPRESSION [CRON_EXPRESSIONS...]]
${USAGE}