Здравствуйте. Написал небольшой скрипт и в нём присутствует пункт с добавлением команд в cron:
(crontab -l ; echo "*/2 * * * * screen -dmS scan_servers bash -c 'cd /var/www && php cron.php 1234 threads scan_servers'
*/2 * * * * screen -dmS scan_servers bash -c 'cd /var/www && php cron.php 1234 threads scan_servers'
*/5 * * * * screen -dmS scan_servers_load bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_load'
*/5 * * * * screen -dmS scan_servers_route bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_route'
*/1 * * * * screen -dmS scan_servers_down bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_down'
*/10 * * * * screen -dmS notice_help bash -c 'cd /var/www && php cron.php 1234 notice_help'
*/15 * * * * screen -dmS scan_servers_stop bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_stop'
*/15 * * * * screen -dmS scan_servers_copy bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_copy'
*/30 * * * * screen -dmS notice_server_overdue bash -c 'cd /var/www && php cron.php 1234 notice_server_overdue'
*/30 * * * * screen -dmS preparing_web_delete bash -c 'cd /var/www && php cron.php 1234 preparing_web_delete'
*/60 * * * * screen -dmS scan_servers_admins bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_admins'
*/1 * * * * screen -dmS control_delete bash -c 'cd /var/www && php cron.php 1234 control_delete'
*/1 * * * * screen -dmS control_install bash -c 'cd /var/www && php cron.php 1234 control_install'
*/2 * * * * screen -dmS scan_control bash -c 'cd /var/www && php cron.php 1234 scan_control'
*/2 * * * * screen -dmS control_scan_servers bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers'
*/5 * * * * screen -dmS control_scan_servers_route bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_route'
*/1 * * * * screen -dmS control_scan_servers_down bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_down'
*/60 * * * * screen -dmS control_scan_servers_admins bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_admins'
*/15 * * * * screen -dmS control_scan_servers_copy bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_copy'
*/5 * * * * screen -dmS graph_servers_day bash -c 'cd /var/www && php cron.php 1234 threads graph_servers_day'
*/5 * * * * screen -dmS graph_servers_hour bash -c 'cd /var/www && php cron.php 1234 threads graph_servers_hour'") 2>&1 | grep -v "no crontab" | sort | uniq | crontab -
chown root:crontab /var/spool/cron/crontabs/root
А в кроне, присутствует только часть:
*/10 * * * * screen -dmS notice_help bash -c 'cd /var/www && php cron.php 1234 notice_help'
*/15 * * * * screen -dmS control_scan_servers_copy bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_copy'
*/15 * * * * screen -dmS scan_servers_copy bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_copy'
*/15 * * * * screen -dmS scan_servers_stop bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_stop'
*/1 * * * * screen -dmS control_delete bash -c 'cd /var/www && php cron.php 1234 control_delete'
*/1 * * * * screen -dmS control_install bash -c 'cd /var/www && php cron.php 1234 control_install'
*/1 * * * * screen -dmS control_scan_servers_down bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_down'
*/1 * * * * screen -dmS scan_servers_down bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_down'
*/2 * * * * screen -dmS control_scan_servers bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers'
*/2 * * * * screen -dmS scan_control bash -c 'cd /var/www && php cron.php 1234 scan_control'
*/2 * * * * screen -dmS scan_servers bash -c 'cd /var/www && php cron.php 1234 threads scan_servers'
*/30 * * * * screen -dmS notice_server_overdue bash -c 'cd /var/www && php cron.php 1234 notice_server_overdue'
*/30 * * * * screen -dmS preparing_web_delete bash -c 'cd /var/www && php cron.php 1234 preparing_web_delete'
*/5 * * * * screen -dmS control_scan_servers_route bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_route'
*/5 * * * * screen -dmS graph_servers_day bash -c 'cd /var/www && php cron.php 1234 threads graph_servers_day'
*/5 * * * * screen -dmS graph_servers_hour bash -c 'cd /var/www && php cron.php 1234 threads graph_servers_hour'
*/5 * * * * screen -dmS scan_servers_load bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_load'
*/5 * * * * screen -dmS scan_servers_route bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_route'
*/60 * * * * screen -dmS control_scan_servers_admins bash -c 'cd /var/www && php cron.php 1234 control_threads control_scan_servers_admins'
*/60 * * * * screen -dmS scan_servers_admins bash -c 'cd /var/www && php cron.php 1234 threads scan_servers_admins'
Заметил ещё, что в разном порядке добавились.