You need to stop the task using the task node's control field. https://sdkdocs.roku.com/display/sdkdoc/Task
So just grab a reference to the task that you previously started and set task.
control="stop"Let me know if you are unclear about this or need any further help. Also hit me up on the Roku Developers Slack Channel for quicker response. (see my signature)
Join the Roku Developers Slack Workspace for quicker help and great dev collaboration: http://tiny.cc/nrdf0y