[SERVER-12292] javascript will not run. Created: 08/Jan/14  Updated: 08/Jan/14  Resolved: 08/Jan/14

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Dwayne Mcnab Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Test


Attachments: File startUpScript.js    
Participants:

 Description   

Hello, I am new to javascript. However, I need to automate most of my admin tasks and it seems like am going to have to get used to using javascript. I wrote this script on my own with the help of a few research of course. The script looks good on paper but wont execute pass line one, two and three. can someone please tell me what error i have in my script. Please see the file attached. Thank you.



 Comments   
Comment by Dwayne Mcnab [ 08/Jan/14 ]

Thanks Scott.

Comment by Scott Hernandez (Inactive) [ 08/Jan/14 ]

These types of questions are best asked in the mongodb-user forum (http://groups.google.com/group/mongodb-user) where users can help answer and many answers already exist.

At a quick glance there are many issues with your script:

  1. it is not javascript – these lines are programs to run from the bash/shell, not js

    mongodump --host SHARD1/mongodb1.local.net:27011,mongodb2.local.net:27021,mongodb3.local.net:27031;

  2. you seem to working from browser js code, many of those objects don't exist in the mongodb javascript shell

It would be best if you address these issues before you post to the forum.

Generated at Thu Feb 08 03:28:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.