You can automate server tasks using javascript here. jQuery is available on this page for those familiar with it.
To send a console command, use
Console.SendCommand("command.here ...");
To pass console output, register a callback using
Console.onMessage(function(msg){ ... });
To perform custom actions when a status update is received from the server, register a callback using
Asura.onStatusUpdate(function(data){ ... });