Ensure that the server is running.
Remote subcommands require a running server.
Ensure that monitoring is enabled for Enterprise Server.
If monitoring for Enterprise Server is disabled, no events that your script is listening for are sent.
For information about how to enable monitoring for Enterprise Server, see To Enable Monitoring in Sun GlassFish Enterprise Server v3 Administration Guide.
Run the run-script subcommand.
This example runs the script /tools/mon/modulestarted.js.
asadmin> run-script /tools/mon/modulestarted.js |
You can also view the full syntax and options of the subcommand by typing asadmin help run-script at the command line.