Terminate the workflow at specific time without message box

Can this be performed in Uipath and pause the robot?

WorkflowInstance instance = runtime.GetWorkflow(instanceId);
instance.Suspend("Paused for some good reason");

// do something here

instance.Resume();
1 Like