Cron
How to get cron job errors in email with MAILTO?
One of the neat features of Cron is the ability to send emails when an error occurs during the execution of the cronjob. This can be done using the `MAILTO` environmental variable. When executing cronjob, any output is mailed to the owner of the crontab or to the user or email address specified in the `MAILTO` environment variable in the crontab, if such exists.
Solved: Crontab bad minute error
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**.
Solved: Cron missing newline before EOF
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.
Solved: (cron) info (No MTA installed, discarding output) error
If you get *SSL certificate problem: unable to get local issuer certificate* error, it's an indication that your root and intermediate certificates on the system are not working correctly or not set up correctly.
How to save cron job output to file?
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.
How to list and view all current cron jobs?
Cron is a command-line job scheduler on Unix-like systems. It allows you to run automated tasks in the background and it's especially useful for repetitive jobs.
How to set up a cron job for a specific time and date?
In this quick tutorial, we will take a look at how to set up a cron job to run at a specific time.
How to Monitor if Your Cron Jobs Run Correctly
Learn what is Cron Job monitoring, how does it work, what are the benefits and drawbacks and how to set it up.
How to prevent duplicate cron jobs from running?
Sometimes you may find that duplicate cronjobs are running at the same time. This may happen when the cronjob takes longer to complete than its execution interval. Here is a simple way to prevent this from happening ever again.
Solved: Errors in crontab file, can't install
You may encounter this error while creating a new crontab or updating an existing one that has a syntax error.
How to run a cronjob as a specific user?
One of the features of Cron is the ability to run Cron jobs as a specific user. Sometimes you may even want to create a special user with limited privileges just to run Cron jobs. There are two methods how to run cronjob as a specific user.
How to start logging cron job output to syslog on Ubuntu 20.04?
In this quick tutorial, we will take a look at how to redirect output from cron jobs to the main system log.
How to run cron jobs every 5, 10, or 30 seconds?
By default, cron checks crontabs for cronjobs every minute. If you want to run a job every n seconds you need to use a simple workaround.
How to view and read cron logs on Ubuntu, Debian and CentOS?
Cron can generate logs, which are very useful in troubleshooting your cron jobs. In this quick tutorial, we will take a look at cron logs – how to find them and how to read them.
How to setup cron job for automatic Let's Encrypt renewal?
Cron is a command-line job scheduler on Unix-like systems. It allows you to run automated tasks in the background and it's especially useful for repetitive jobs.
How to run cron jobs every 5, 10, 15 or 30 minutes?
Every minute cron goes through all the crontabs and looks for the jobs that should be executed. The exact time of the execution can be specified using the cron syntax. Whenever the parameter matches the current date and time cron job is executed.