开发者

/bin/sh: get: command not found

When I try to run a script by cron I get this error messaege:

/bin/sh: get: command not found

I also tried it in bash shell, and I tried 'curl', 'wget' and 'fetch' but non of them helped.

Can anybo开发者_C百科dy tell solution? : D


You might also try this:

lynx -dump "http://www.example.com" > /dev/null


What OS, and what is the script that you're trying to run?

If it's trying to fetch a file from a url, try substituting get with wget. That might work.


Linux

/usr/local/bin.something.sh:

#!/usr/bin/env bash

# Some script ehere

Crontab:

00 *    * * *   root    /usr/local/bin/something.sh

All elements should be listed above :-)


cron(8) uses sh(1) to execute commands. The environment that sh(1) sees might not be the environment that you see interactively. If so, then you can enhance the profile files to obtain the same environment or have cron(8) execute a command that obtains the correct environment (e.g. bash -l -c '...').

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜