Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

/custom/savedquery/schedulejob/{jobtitle}/{jobdesc}/{communityIds}/{timeToRun}/{frequencyToRun}/{query}/{inputcollection}/{outputKey}/{outputValue}

Schedules a query job. Returns the output collection id in the data field of the response if successfully queued to run.

A simple web-based utility is available for scheduling jobs.

Authentication

Required, see Auth - Login.

Arguments

jobtitle (required)
A descriptive name of the job being submitted.

jobdesc (required)
A description of what the job being submitted is attempting to do.

communityIds (required)
Community ID, or IDs (comma-separated), that the query job wants to run on. These will be appended to the mongo query.

timeToRun (required)
The time you want a job to be run after in long form. For example if you want it to run immediately when possible you can submit 0. If you want the job to run after January 1, 2015 submit: 1420106400000.

frequencyToRun (required)
How often the job should be ran, either: NONE, DAILY, WEEKLY, MONTHLY. This will cause the job to get resubmitted after running, use NONE if you only want the job to run once.

query (required)
The mongo query to use to get the jobs data. {} is a blank query or you can submit null.  A typical place to get a query is by using the gui at infinite.ikanow.com and going to Advanced -> Save.

inputcollection (required)
The mongo collection you want to use as input. DOC_METADATA is the only currently available option.

outputKey (required)
Currently set to "null" will be used in the future.

outputValue (required)
Currently set to "null" will be used in the future.

Example

http://infinite.ikanow.com/api/custom/savedquery/schedulejob/TestJob/Testing%20map%20reduce/4e9c77ef17ef3523b657a890/0/NONE/null/DOC_METADATA/null/null

Example Response
{"response":{"action":"Schedule MapReduce Job","success":true,"message":"Job scheduled successfully, will run on: Wed Dec 31 19:00:00 EST 1969","time":246},"data":"4f2007dd8196fe53a52c25a1"}
Error Response
{"response":{"action":"Schedule MapReduce Job","success":false,"message":"You are not allowed to use the given input collection.","time":142}}
  • No labels