Very often the reason that crontab for root user is not working is a problem in the editor, which is being used on Linux..
This problem is that after the editor changes the root file in the directory var/spool/cron/ it will add a control character ” ^M ” which cron will try to execute as a component part of the command.
The solution to this problem is very simple and consists in the fact that the control character ” ^M ” is removed from the end of each row.
For this change should be used an editor that will not automatically re-record the same control character after saving the file.
Tried and true editor is the editor which comes as a part of the Midnight Commander. Midnight Commander can be called with the command ‘mc’ and editing of the selected file by pressing the F4 key.
If the Midnight Commander editor is not installed on your Linux server, you can install it simply using following command:
yum install mc