# Run cron on ssh, error message

**URL:** <https://community.unix.com/t/run-cron-on-ssh-error-message/319173>\
**Category:** Shell Programming and Scripting\
**Created:** [November 1, 2012, 3:53am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173 "2012-11-01T03:53:33Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dolbyater](https://community.unix.com/letter_avatar/dolbyater/32/5_5575768a8748004e209b776fc1b2916d.png) [@dolbyater](https://community.unix.com/u/dolbyater)\
**Post date:** [November 1, 2012, 3:53am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/1 "2012-11-01T03:53:33Z")

</div>

how to run the script below

```nohighlight
* * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron"

```

when i run the script, the error message show as below:

```nohighlight
$ * * * * * /usr/bin/wget -O - -q "http://website.com/?q=admin/settings/scheduler/cron"
-sh: CHANGELOG.txt: not found
$ 30 15 * * * /usr/bin/wget -O - -q "http://website.com/?q=admin/settings/scheduler/cron"
-sh: 30: not found

```

can the script above run in ssh (using putty software)

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/5_5575768a8748004e209b776fc1b2916d.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [November 1, 2012, 3:56am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/2 "2012-11-01T03:56:41Z")

</div>

The first five numbers and asterisks are for cron. You don't 'run' that part

If you want to run it with cron, type...

```nohighlight
crontab -e

```

to edit your crontab file and paste the whole line there.

If you want to run it from the command line, remove the \* \* \* \* \* or 30 15 \* \* \*.

---

<div class="post-metadata">

**Author:** ![dolbyater](https://community.unix.com/letter_avatar/dolbyater/32/5_5575768a8748004e209b776fc1b2916d.png) [@dolbyater](https://community.unix.com/u/dolbyater)\
**Post date:** [November 1, 2012, 4:05am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/3 "2012-11-01T04:05:37Z")

</div>

are you mean like this?

crontab -e /usr/bin/wget -O - -q "[http://example.com/scheduler/cron](http://example.com/scheduler/cron)

how to set time for it?

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/5_5575768a8748004e209b776fc1b2916d.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [November 1, 2012, 4:11am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/4 "2012-11-01T04:11:59Z")

</div>

No, just

```nohighlight
/usr/bin/wget -O - -q "http://example.com/scheduler/cron"

```

Sorry, I missed some text in my previous post. Updated.

If you want to run it with cron, type...

```nohighlight
crontab -e

```

to edit your crontab file and paste the whole line there.

The first five fields (\* \* \* \* \*, etc) tells cron when to run it. You don't need that on the command line.

---

<div class="post-metadata">

**Author:** ![dolbyater](https://community.unix.com/letter_avatar/dolbyater/32/5_5575768a8748004e209b776fc1b2916d.png) [@dolbyater](https://community.unix.com/u/dolbyater)\
**Post date:** [November 1, 2012, 4:28am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/5 "2012-11-01T04:28:59Z")

</div>

> [@scott](#):
>
> No, just
> 
> ```plaintext
> /usr/bin/wget -O - -q "http://example.com/scheduler/cron"
> 
> ```
> 
> Sorry, I missed some text in my previous post. Updated.
> 
> If you want to run it with cron, type...
> 
> ```plaintext
> crontab -e
> 
> ```
> 
> to edit your crontab file and paste the whole line there.
> 
> The first five fields (\* \* \* \* \*, etc) tells cron when to run it. You don't need that on the command line.

but i need the server run cron every 10minutes, how to set this?

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/5_5575768a8748004e209b776fc1b2916d.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [November 1, 2012, 4:32am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/6 "2012-11-01T04:32:22Z")

</div>

Why didn't you just ask that from the beginning?

man -s5 crontab

---

<div class="post-metadata">

**Author:** ![dolbyater](https://community.unix.com/letter_avatar/dolbyater/32/5_5575768a8748004e209b776fc1b2916d.png) [@dolbyater](https://community.unix.com/u/dolbyater)\
**Post date:** [November 1, 2012, 7:19am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/7 "2012-11-01T07:19:53Z")

</div>

> [@scott](#):
>
> Why didn't you just ask that from the beginning?
> 
> man -s5 crontab

just for confiramtion  
after run  
/usr/bin/wget -O - -q "[http://example.com/scheduler/cron](http://example.com/scheduler/cron)"

than run

man -s5 crontab

is that correct?

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/5_5575768a8748004e209b776fc1b2916d.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [November 1, 2012, 7:57am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/8 "2012-11-01T07:57:01Z")

</div>

No, that isn't correct.

I'm suggesting that you read the manual page for crontab so you can understand what you have to do.

Once you understand it, run `crontab -e` and add a line to run the job at the desired time.

i.e.

```nohighlight
0,10,20,30,40,50 * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron"

```

---

<div class="post-metadata">

**Author:** ![dolbyater](https://community.unix.com/letter_avatar/dolbyater/32/5_5575768a8748004e209b776fc1b2916d.png) [@dolbyater](https://community.unix.com/u/dolbyater)\
**Post date:** [November 1, 2012, 10:04am UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/9 "2012-11-01T10:04:53Z")

</div>

> [@scott](#):
>
> No, that isn't correct.
> 
> I'm suggesting that you read the manual page for crontab so you can understand what you have to do.
> 
> Once you understand it, run `crontab -e` and add a line to run the job at the desired time.
> 
> i.e.
> 
> ```plaintext
> 0,10,20,30,40,50 * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron"
> 
> ```

when running man -s5 crontab  
 ![](https://community.unix.com/uploads/default/original/2X/7/74c97b214623208e532f1838d7ac658d974d2a96.jpeg)

when running crontab -e  
 ![](https://community.unix.com/uploads/default/original/2X/8/876f3b46473d2f5aa6b78bd2c74f63e0ab820c8d.jpeg)

what so i do for next step?

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/5_5575768a8748004e209b776fc1b2916d.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [November 1, 2012, 4:37pm UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/10 "2012-11-01T16:37:33Z")

</div>

Before we go any further I need to know a couple of things.

1. What are you really trying to accomplish?
2. Who for (the 'who' can be you, that's OK - but then the question is 'why')?

---

<div class="post-metadata">

**Author:** ![dolbyater](https://community.unix.com/letter_avatar/dolbyater/32/5_5575768a8748004e209b776fc1b2916d.png) [@dolbyater](https://community.unix.com/u/dolbyater)\
**Post date:** [November 1, 2012, 5:14pm UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/11 "2012-11-01T17:14:22Z")

</div>

> [@scott](#):
>
> Before we go any further I need to know a couple of things.
> 
> 1. What are you really trying to accomplish?
> 2. Who for (the 'who' can be you, that's OK - but then the question is 'why')?

1. What are you really trying to accomplish?  
i need to set the url below  
[IANA � Example domains](http://example.com/scheduler/cron)  
to run cron every 5 minute

2. Who for (the 'who' can be you, that's OK - but then the question is 'why')?  
i am webdesign, set for our own company. we dont have programmer, so it hard for me to do it because i have no any knowledge for ssh.

can you list our step by step, thank you very much.🙂

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/5_5575768a8748004e209b776fc1b2916d.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [November 1, 2012, 5:29pm UTC](https://community.unix.com/t/run-cron-on-ssh-error-message/319173/12 "2012-11-01T17:29:14Z")

</div>

IMO, you are too stupid to own a computer, so no, I can't.
