6 ms·
Show HN: Cron Syntax Cheatsheet
- Leandros 9y agoThat's a great cheatsheet! I prefer https://crontab.guru https://crontab.guru, though, since it's super easy to see when the next cronjob will run.
- cuu508 9y agoYeah, 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 http://i.imgur.com/CIcKgOk.png
- est 9y agoRelated: https://pyformat.info/ https://pyformat.info/ http://strftime.org/ 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.
- cdubzzz 9y agoVery clear design. Would be cool if it could be made interactive.
- cryptonector 9y agoI 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.
- funkaster 9y agoWhat 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 https://wiki.archlinux.org/index.php/Systemd/Timers
- gkya 9y agoThat'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.
- jlgaddis 9y agoIs this actually valid syntax? > "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 * 6
- cuu508 9y agoVixie 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 https://en.wikipedia.org/wiki/Cron#CRON_expression