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

.
Menu