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('internal').db._query('" + theQuery + "');" ........> }); { "id" : "mytask-1", "name" : "this is a sample task to spawn a slow aql query", "type" : "timed", "offset" : 0.00001, "created" : 1465810635.833814, "command" : "require('internal').db._query('FOR sleepLoooong IN 1..5 LET sleepLoooonger = SLE...", "database" : "_system", "code" : 200 } arangosh> queries.current(); [ { "id" : "216", "query" : "FOR sleepLoooong IN 1..5 LET sleepLoooonger = SLEEP(1000) RETURN sleepLoooong", "started" : "2016-06-13T09:37:15Z", "runTime" : 1.0188930034637451, "state" : "executing" } ]