# Is it possible?

**URL:** <https://www.ruby-forum.com/t/is-it-possible/168503>\
**Category:** Rails\
**Created:** [May 21, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503 "2009-05-21T16:08:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [May 21, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503/1 "2009-05-21T16:08:08Z")

</div>

Hello G.s,  
I have a requirement in which a cron will run everyday and a rake file  
will  
execute along with rake file i need to javascript function so just  
wanted to  
know is there any way i can run a javascript.

Regards  
Abhishek S.

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [May 21, 2009, 6:10pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503/2 "2009-05-21T18:10:45Z")

</div>

Helloo Abhishek,

On Thu, 2009-05-21 at 19:37 +0530, Abhishek shukla wrote:

> Hello G.s,  
> I have a requirement in which a cron will run everyday and a rake file  
> will execute along with rake file i need to javascript function so  
> just wanted to know is there any way i can run a javascript.

Cron and rake are server-side tools. Javascript runs in the browser.  
You can’t, AFAIK, run Javascript from the server. What is it, exactly,  
that you think you need Javascript to do?

Best regards.  
Bill

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [May 21, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503/3 "2009-05-21T18:25:58Z")

</div>

On Thu, May 21, 2009 at 9:10 AM, bill walton [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> You can’t, AFAIK, run Javascript from the server. What is it, exactly,  
> that you think you need Javascript to do?
> 
> Best regards.  
> Bill

You want to take a look at what the guys did over at Aptana:

[http://ejohn.org/blog/server-side-javascript-with-jaxer](http://ejohn.org/blog/server-side-javascript-with-jaxer)  
[http://www.aptana.com/jaxer](http://www.aptana.com/jaxer)

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [May 22, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503/4 "2009-05-22T15:57:54Z")

</div>

Hello Bill,  
Basically i am calling a third party javascript api after a signup  
action.  
And we have a monthly renewal of account as well which execute through a  
rake command and even that time i’ll need to run this Javascript api ☹

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [May 22, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503/5 "2009-05-22T17:05:16Z")

</div>

On Fri, May 22, 2009 at 6:56 AM, Abhishek shukla [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Basically i am calling a third party javascript api after a signup action.  
> And we have a monthly renewal of account as well which execute through a  
> rake command and even that time i’ll need to run this Javascript api ☹

You don’t “run” an api.

What action is being invoked, and where is it supposed to take place?

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [May 21, 2009, 8:22pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503/6 "2009-05-21T20:22:06Z")

</div>

Is there any reason you can’t convert the javascript to Ruby?
