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" : 1443627581.918138, "command" : "require('internal').db._query('FOR sleepLoooong IN 1..5 LET sleepLoooonger = SLE...", "database" : "_system", "code" : 200 } arangosh> queries.current(); [ { "id" : "130", "query" : "FOR sleepLoooong IN 1..5 LET sleepLoooonger = SLEEP(1000) RETURN sleepLoooong", "started" : "2015-09-30T15:39:41Z", "runTime" : 2.0013840198516846 } ]