The customer portal my.neoserv.com has been redesigned. If you notice any issues, please let us know.

Cart (0)
  • Your cart is currently empty.

NEOSERV BLOG

Tips, guides and useful information about domains, hosting, SSL certificates, email, web optimization and online security.

Category: Web Hosting
Published:

Cron Jobs allow scripts to be run automatically to perform predefined tasks on a server. Errors can occur during the execution of cron jobs, most often due to incorrect cron job settings, errors in the application or website, errors in the software or shell script being executed, etc.

How to set up cron jobs correctly can be found in this article, where we also show some examples of different commands that can be added via the cPanel control panel.

How to determine where the error is located if cron jobs are not working as expected?

When troubleshooting a cron job, whether the job is set to“silent” or“loud” plays an important role. If it is set to “silent”, it means that the command contains the record ls -al > /dev/null 2>&1 at the end, thus the result of the cron job is not written anywhere.

In order to fix the error, the cron job must be set to “loud”. This is done by removing the > /dev/null 2>&1 at the end of the command. This causes the results of the execution to be logged to one of the folders:

  • /home/username/mail/new
  • /home/username/mail/cur

The error can therefore be detected by looking at the contents of the log file.

It is important to set the cron job to “loud” only for a short time, i.e. only for the time when the error is being fixed. Once the error has been resolved, we need to “silence” them again by adding ls -al > /dev/null 2>&1, otherwise the log files will be created endlessly on the hosting package, which means that eventually there will be hundreds of thousands or even millions of unnecessary files on the package.

COMMENTS

COMMENT THE POST

(mandatory)
(mandatory, email address will be hidden)
(optional)
Security question that confirms you are a real person.