Multiple crons at same interval fails – linux crontab

Posted on

Multiple crons at same interval fails – linux crontab – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, php, cron, scheduler, sh.

In my server, I have scheduled following set of cron files.

00 21 * * * /bin/sh /path/
*/2 * * * * /usr/bin/php /path/file1.php
*/2 * * * * /usr/bin/php /path/file2.php
*/2 * * * * /usr/bin/php /path/file7.php
*/2 * * * * /usr/bin/php /path/file8.php

All the cron files are working on time. But last two php files 7 and 8 are not running.

Whether it’s skipped due to previous crons tooks too time or any other reason behinds ?

Please help me to resolve this issue. Thanks in advance.

Solution :

The reason of the fail is highly depends on your cronjobs sheduler.

Anyway, try to move them to single (shell)script somewhere in /usr/local/bin and call it instead.

Leave a Reply

Your email address will not be published. Required fields are marked *