pass node and task information to script

This allows the script to have more knowledge so it can make more
in-depth decisions if needed.