Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

How admins can cancel scheduled as well as ad-hoc jobs manually or programmatically?

prashantkunjir
7 - Meteor

Folks,

 

We've Alteryx Server 2020.2. Users either schedule workflows or run it on demand. We're looking for automating monitoring processes. While admins can view/cancel scheduled jobs same is not the case with ad-hoc runs.

 

Is there any way by which admin can view/cancel scheduled as well as ad-hoc jobs?

 

Thanks,

Prashant

5 REPLIES 5
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

Hey @prashantkunjir . 

There are some ways to ad-hoc cancel jobs. 

The fastest/easiest way I've found is to log into either the server console or an admin to have a desktop with the server token attached:

https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Connecting-to-a-controller-in-3-easy-...

Then, the running and scheduled jobs are viewable on the desktop by going to Options --> View Schedules.

Make sure the controller drop down is selecting the controller.  Workflows in the Queue tab are those currently running, and Schedules contains the full schedule of the workflow.

prashantkunjir
7 - Meteor

Hi @patrick_mcauliffe,

 

Solution you provided is very helpful. Thanks for that. I have follow up question around automating it.

 

We've requirement where we need to gracefully cancel any running job before we start taking mongoDB backup on daily basis. As backup is a daily task which is automated, we need some programmatic way to handle job cancellation.

 

Thanks,

Prashant

 

raychase
11 - Bolide

I incorporated a line of code within my backup script to kill any instances of AlteryxEngineCmd.exe, which would effectively cancel any jobs that are currently running:

 

taskkill /F /IM "AlteryxEngineCmd.exe" /T

 

prashantkunjir
7 - Meteor

@raychase Thanks for your response. Does this command gracefully cancel the job? I heard from Alteryx support that killing jobs this way may corrupt mongoDB. Have you noticed something like that happened in your case?

 

Thanks,

Prashant

raychase
11 - Bolide

I've read mixed opinions on whether or not this could cause MongoDB corruption.  What I know is that I've been using the command in several environments for over a year, and it hasn't caused any issues for us.  Users have the ability to cancel running jobs from the Gallery, so it doesn't seem unprecedented to kill the jobs using task manager.  I've compared the engine logs for jobs cancelled via taskkill command vs. cancel job function on the Gallery, and their terminations appear equal in nature.  If it's unadvisable to kill running jobs, then I would argue that the feature should be deprecated from the Gallery.

 

Just my thoughts, of course.