🔭 Want to get alerted when your Cron doesn’t run correctly?
Go to Better Stack and start monitoring in 5 minutes.
Cron reads every line of the crontab. If the line is not a comment or an environmental variable, cron expects a correct and valid minute expression of the cronjob. If there is an invalid minute expression (e.g. a typo), cron will throw a Bad minute error.
Go to Better Stack and start monitoring in 5 minutes.
Make sure there is one cronjob per line. One cronjob should not be defined on multiple lines.
Crontabs have simple, but strict syntax rules. Every crontab file has to:
This error may also happen when a crontab file is generated automatically and the generator failed to insert a newline character at the end of the crontab file.
You may encounter this error while creating a new crontab or updating an existing one that has a syntax error.
Any cron job can generate output. It may be log or error messages. Regardless of the nature of the output, you may want to save this output to a file. This can be done using the `>` operator.
In this quick tutorial, we will take a look at how to set up a cron job to run at a specific time.
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.