Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从 crontab 运行命令,因为我的命令仅使用“sh -x abc.sh”运行
当我从 cron 运行没有“sh -x”的 abc.sh 文件时,它会将错误发送为“sh:abc.sh:未找到”。
我的脚本以 #!/bin/bash 开头,它是 AIX。
请提供任何帮助。
答案在Stack Overflow Cron Tag Info页面中。
基本上 cron 是如何知道你的脚本在哪里的?它以与您不同的用户身份运行,具有受限环境(和 PATH),因此您需要脚本的完整路径。