
Show HN: Cron Syntax Cheatsheet - cuu508
https://healthchecks.io/docs/cron/
======
Leandros
That'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
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](http://i.imgur.com/CIcKgOk.png)

------
est
Related:

[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.

------
jlgaddis
Is 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
Vixie 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)

------
gkya
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.

------
cryptonector
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.

~~~
funkaster
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](https://wiki.archlinux.org/index.php/Systemd/Timers)

------
cdubzzz
Very clear design. Would be cool if it could be made interactive.

