Help with basic shell script. /bin/sh: source: not found

后端 未结 2 890
抹茶落季
抹茶落季 2020-12-29 04:09

My cron :

45 10 * * * source /home/ThinkCode/Test/hello.sh

hello.sh :

#!/bin/bash
echo \"helloworld\"

Th

相关标签:
2条回答
  • 2020-12-29 04:55

    Real sh doesn't have source, only .. Either change the shell in cron to bash, or use . instead.

    0 讨论(0)
  • 2020-12-29 05:07

    Why are you sourceing the file from cron. Why not just execute it?

    0 讨论(0)
提交回复
热议问题