Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

! Duplicates questions 43733


Is there any validator for training purposes where you can enter cron syntax like

0 0/5 9-17 * *

and it will print out:

  • more detailed errors and suggestions
  • pronounced, readable text format (Option -h ;) )
    • e.g. "every 5 hours between 9th and 17th each month"
share|improve this question

closed as off-topic by womble Dec 9 '15 at 5:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Unless you're using a different version of cron than I am, that line does not represent "every 5 minutes between 9 and 17 o'clock every day". I guess that's why a readable text format output is required. :-) – Ladadadada Aug 15 '12 at 13:56
    
rofl, sorry, got confused while writing "crons" for jira: confluence.atlassian.com/x/gAISCw – childno.de Aug 15 '12 at 14:38
    
Possible duplicate of Is there a way to validate /etc/crontab’s format? – childno.de Dec 6 '15 at 16:59
up vote 1 down vote accepted

A command line tool that gives you a readable description of the cron expression is available at https://github.com/mrferos/hcron (implemented in JS for node.js). However, it doesn't do any validation or recommendations.

share|improve this answer
    
thx for the hint crontab.guru ; that's what I was looking for ;) – childno.de Dec 6 '15 at 16:50

You can use crontab -e which will open an editor allowing you to edit cron jobs. It will report errors in case you mistyped the cron job line.

share|improve this answer
    
shure, but I need something for really stupid guys who want to learn what they enter ;) (sometimes it's boring teaching this again and again to the trainees – childno.de Aug 15 '12 at 12:31
    
@childno.de: It seems that you did not describe your question properly in the first time. – Khaled Aug 15 '12 at 12:43
    
yes you're right, I'm sorry about that – childno.de Aug 15 '12 at 12:51

I highly recommend http://crontab.guru for this. Using your example above, it tells me:

“At every 0th minute past the 0, 5, 10, 15 and 20th hour on the 9, 10, 11, 12, 13, 14, 15, 16 and 17th of every month.”

It also give hints for each field you're editing as well as general cron tips with informative links for configuring cron on servers.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.