The appdynamics.cron.vm property creates a delay between the end of the main method and the JVM exit so that the Agent has time to upload metrics to the Controller.
Use the Script Name as the Node Name
You can use the name of the script that executes a cron or batch job in the node name. These commands set the value of variable NODE_NAME using the combination of the script and hostname. Add these commands to the startup script of the JVM.
# Use the name of the script (no path, no extension) as the name of the node.
NODE_NAME=sample
NODE_NAME="${NODE_NAME%%.}"
echo $NODE_NAME
# Localize the script to the host.
NODE_NAME="$NODE_NAME@$HOSTNAME"