Bad Minute crontab error
To understand this error, it's useful to know two rules about crontab files:
Every line in your crontab must conform with the cron specification. Other than blank lines and environment variables, every line must be a comment (beginning with
#
) or begin with a valid cron job schedule expression.The first part of a cron job schedule expression is the minute field.
What causes this error
When cron reads each line of your crontab, if the line is not a comment it expects it to start with a valid minute expression. If for some reason it doesn't, it will raise a Bad Minute
error.
Fixing bad minute errors
This type of error could have many causes. Here are some troubleshooting steps to identify and fix the problem.
The error message will commonly indicate the line number that is problematic. Look for the number after a colon, in this example it's line 11.
"/tmp/crontab.gLfS38":11: bad minute
Check for unexpected line breaks in your crontab file. Sometimes you may inadvertently wrap a long line by adding a line break. Cron requires the full schedule and command on a single line.
Good:
0 0 * * * /very/long/example/command/goes/here "with several very long arguments"
Bad:
0 0 * * * /very/long/example/command/goes/here "with several very long arguments"
If every line begins with a cron schedule, check that the first field is accurate. Here are the allowed values for the
minute
field:Value Description 0-59 Specific Minute * Every Minute , List of Minutes, e.g. 1,3,5 - Range of Minutes, e.g 1-10 / Minute step value, e.g. 1/5 Tip: To verify and validate your cron expression use Crontab Guru.
Review any comments in your crontab file and ensure that they all start with a
#
.If you have verified that your cron expression is correct and you have examined each line for spurious characters or extra line breaks, it's possible you are dealing with a non-standard version of Cron. Review your local documentation for further guidance on crontab format. You can do this from your command line by running
man 5 crontab