Solution that cron cannot execute due to coding problems

Time:2022-1-14

Recently, I encountered a very strange problem when using Tencent cloud server (CentOS 6.5 64bit system), that is, the cron service is completely normal, but the commands written in the crontab are not executed on time, so I opened the / var / log / cron log file to check the log, and found that all the executed commands are automatically followed by a small tail like ^ M, So Baidu “^ m” looked at what it was. Baidu learned that it was a combination of DOS coding and UNIX coding in the same file environment, resulting in line feed coding errors. Please refer to the solutionhttp://www.changwei.me/archiv…that will doSolution that cron cannot execute due to coding problems