例如简单的ifconfig命令,在shell中运行成功,但是在crontab 中执行失败。

定位原因:环境变量

解决方案:

whereis ifconfig

然后在shell中加入:

PATH=PATH:/sbin

然后可以验证在crontab中也可以正常运行了

相关文章:

  • 2022-01-17
  • 2021-08-08
  • 2021-04-02
  • 2022-12-23
  • 2021-11-29
  • 2021-12-10
  • 2022-01-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2022-02-03
  • 2021-12-18
相关资源
相似解决方案