arangosh> var theQuery = 'FOR sleepLoooong IN 1..5 LET sleepLoooonger = SLEEP(1000) RETURN sleepLoooong'; arangosh> var tasks = require("@arangodb/tasks"); arangosh> tasks.register({ ........> id: "mytask-1", ........> name: "this is a sample task to spawn a slow aql query", ........> command: "require('@arangodb').db._query('" + theQuery + "');" ........> }); { "id" : "mytask-1", "name" : "this is a sample task to spawn a slow aql query", "created" : 1484129199.912137, "type" : "timed", "offset" : 0, "command" : "(function (params) { require('@arangodb').db._query('FOR sleepLoooong IN 1..5 LE...", "database" : "_system", "code" : 200 } arangosh> queries.current(); [ { "id" : "204", "query" : "FOR sleepLoooong IN 1..5 LET sleepLoooonger = SLEEP(1000) RETURN sleepLoooong", "started" : "2017-01-11T10:06:39Z", "runTime" : 29.65037703514099, "state" : "executing" } ]