Show HN: Cron Syntax Cheatsheet(healthchecks.io)
healthchecks.io
Show HN: Cron Syntax Cheatsheet
https://healthchecks.io/docs/cron/
6 comments
That's a great cheatsheet! I prefer https://crontab.guru, though, since it's super easy to see when the next cronjob will run.
Yeah, crontab.guru is neat, I used it to double-check my examples too!
PS Although not available as a standalone tool, healthchecks.io has a sort of similar feature too: http://i.imgur.com/CIcKgOk.png
PS Although not available as a standalone tool, healthchecks.io has a sort of similar feature too: http://i.imgur.com/CIcKgOk.png
Related:
https://pyformat.info/
http://strftime.org/
This latter actually lacks quite a few like %F %T, I tried to improve its github but it turned out to be a bs4 scraping python's official doc to generate the website.
https://pyformat.info/
http://strftime.org/
This latter actually lacks quite a few like %F %T, I tried to improve its github but it turned out to be a bs4 scraping python's official doc to generate the website.
Is this actually valid syntax?
> "Run at 2PM on the first Saturday of every month"
> "Run at 2PM on the first Saturday of every month"
0 14 * * 6#1
I've never seen this ("6#1") used in my ~20 years of using (primarily Vixie) cron. Instead, I've always seen and used a "workaround" such as 0 14 0-6 * 6Vixie cron seems to ignore the #1 part (not a syntax error, just ignored), and it's not mentioned in "man 5 crontab".
It is however documented in Wikipedia Cron article: https://en.wikipedia.org/wiki/Cron#CRON_expression
It is however documented in Wikipedia Cron article: https://en.wikipedia.org/wiki/Cron#CRON_expression
That's not meant to be a cron cheatsheet though. That's a showcase of what this service supports in cron jobs. Also, if it was a cheatsheet, then it'd be a useless one as crontab(5) is roughly 5 pages long and quite digestible. I guess we need a better search frontend for man pages.
I have the crontab format. Also at(1).
We need something much better. It's certainly convenient that it's text, so structuring a crontab entry much more seems undesirable. But still. A better cron is one of many, many, many things on my "to implement some day" list.
We need something much better. It's certainly convenient that it's text, so structuring a crontab entry much more seems undesirable. But still. A better cron is one of many, many, many things on my "to implement some day" list.
What about systemd timers[1]? I use them all the time, even at user level. After learning about them, I completely stopped using cron.
[1]: https://wiki.archlinux.org/index.php/Systemd/Timers
[1]: https://wiki.archlinux.org/index.php/Systemd/Timers
Very clear design. Would be cool if it could be made interactive.