English 中文(简体)
/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 anybody 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 ... ).





相关问题
Cron on XAMPP (Mac OS)

I have installed XAMPP server on my Mac OS, how to setup a cron job on it? My requirement is that i want to call a php script at regular intervals . Thanks

Call function periodically in Java

we need run one function periodically in Java web application . How to call function of some class periodically ? Is there any way that call function when some event occured like high load in server ...

Cron in Google App Engine

I have made an app using Google App Engine in python of weekly Project and assessment report submitting. I want to check that on Friday who have submitted the report and who don t just send the ...

Mysql trigger/events vs Cronjob

I have an auction website which let my users place an unlimited amount of autobiddings. To monitor these autobiddings something has to check the database every second. My question is if it is ...

Run a PHP script every second using CLI

I have a dedicated server running Cent OS with a Parallel PLESK panel. I need to run a PHP script every second to update my database. These is no alternative way time-wise, it needs to be updated ...

Batch Job Dependencies Using Open Source/Free Software

I run a large data warehouse plant where we have a lot of nightly jobs running concerruently however many have dependencies on a extract or data load process before they start. Currently we use an ...

Automatic Database reads/write every second

I am making an auction website, which has an auto-bid system. This system lets people make biddings without having to be there. My question is how to implement such a system. I have made the php ...

热门标签