What if crontab executes the error report?

often encounter some commands executed directly will not be wrong, execute in crontab will report an error, how to solve this problem.

Mar.09,2022

you have no error message. I guess there is no error in converting it to unix file. Try this:
convert to unix file: dos2unix crontab_abc.sh


is likely to be the problem of environment variables. The env of crontab is different from the env of logged-in users. Either source it in your script or command to write an absolute path


look at the contents in the log file

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39d62-2c1c0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39d62-2c1c0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?