Task execution and automation using Invoke