Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Server Discussions

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

Scheduled workflows using the Windows Task Scheduler Stop Unexpectedly

AmarKap
6 - Meteoroid

Hello:

I've been having a rather strange issue happening with my Alteryx (latest version).  Here is my setup/configuration:  I have approx. 23 workflows that all need to run one after another.  To accomplish this, I've created a batch and created a separate AlteryxCmdEngine.exe line for each file.  Now if I double click this file, my workflows all kick off and work as expected (usually but I'll get to that in a moment).  Anyway, when it works about 75% of the time everything is awesome.  I've even wired up this batch file to a Windows Scheduler Task and again 75% of the time everything is great and amazing.  

 

Now 25% of the time, something odd happens.  Using the Windows Task Manager where you can see the CPU % for each Image name I can see that AlteryxCmdEngine.exe just went down to 0% and doesn't change from there.  It is still there in the list and Task Scheduler shows it is still running...but just sort of dead at 0% CPU.

 

I came to know this because in the 23rd workflow I've put in an Event to email me when it is finished.  I know almost everyday that batch file and 23 workflows takes about 1 hour and 6 minutes to finish.  So I know the batch file kicks off at 8:00AM each morning and by 9:06AM I get my email.  I know everything is smooth.  But again, 25% of the time, I won't get that email and I know something is wrong.  So I check the Task Manager and notice what I wrote above: ALteryxCmdEngine is at 0%.

 

What I end up doing is simply grabbing the Workflows that still did not execute and put them in their own temporary batch file and execute them there.  Doing that works and it finishes (using a separate AlteryxCmdEngine.exe instance...the other one still sits at 0%).

 

Okay, thanks for reading.  Anyone have any input or suggestion on what I may have done wrong?  Has anyone else ever come to something like this?  Or is this all now a candidate for me to use Alteryx Server which my company still does not have.

 

Thanks in advance.

 

I did try my test to research this but could not find anyone else having roughly the same issue as me.

 

Amar 

7 REPLIES 7
anthony
11 - Bolide

Does your screen lock?

 

I am not 100% sure the if the AlteryxCmdEngine runs when windows is locked or not but I know i have had issues were windows locks down some services when locked so I removed the lock and it solved my issues.

AmarKap
6 - Meteoroid

Hello.  Thank you for the help lead.  I actually read your response prior to my job running at 8:00AM EST.  I preparation I made sure to adjust all my power setting so as not to shutdown anything or go into Sleep mode etc.  (all set to 120 minutes or 2 hours).   Additionally, I simply kept moving the mouse so to hopefully prevent any shutdowns.  The behavior today was 22 out of 23 workflows all executed without issue.  Alas, the very last one...just never finished.  Again, the AlteryxCmdEngine.exe was in my list at 0%.  So I ran that very last workflow manually and of course it finished that way.

 

Maybe I'm running too many workflows?  I'm considering maybe to split up the batch files into two files to see if that helps. 

 

I will keep you posted.

 

Thanks,

anthony
11 - Bolide

You might want to consider building a single workflow that takes your list of modules and runs one at a time with a macro.

 

Serves a couple of purposes - the list of files now becomes your 'schedule' eg, you can put the files in the order you want and can they just live in a text file you can easily modify. you can also add dates to run, priorities, how many times to run etc and then have a workflow that does the heavy lifting on the 'schedule' to build out your master list for the day. I do something like this and it works amazingly well. I also parse this list into an html table and add it to my favorite tab so I can get quick access to my paths. I even got fancy and added a copy path button to table so I did not have to ctrl c/v. There are a lot of cool things you can do if you build your own scheduler :)

 

Second your windows scheduler only has to run one file and will be easier to find where the issue originates.

 

Now you can just pass your modules one at time to a run command inside a macro that will wait for the first bat to complete before moving onto the next bat you pass. I just create a temp bat file prior to run command.

 

 

AmarKap
6 - Meteoroid

Good Morning Anthony.

My sincere thanks to you for continuing to assist me with my issue.  I'm excited to implement your suggestions but I must confess I'm still quite an newbie with Alteryx and thus may require a bit more hand-holding.

 

Because my current set of workflows were based off of an converted Microsoft Access database which were split out into 23+ queries...this is what lead me to creating approx. 23 separate workflows.  As I am still quite a beginner it seemed to be the best way I knew how.  This way I could also test and fix against the output from MS Access.  Now that my workflows are Production ready, I can certainly look to combining them into one. 

 

What is coming into my head is that I would make a Container for each separate workflow all within one actual Alteryx Workflow File?  Then each container would hold the contents of one of my individual workflow files.  Is that what you meant?

 

The words that I'm still having challenges with in your post (and for my implementation) are Modules and Macros. 

 

Again, I'm excited about all the positives you mentioned and will try this but just not sure how to do so.

 

If I can burden you once more to provide a few links or things to look up in the documentation I can roll from there. 

 

For today, I'll simply hand-hold my batch file...no problem.  But looking forward to a better way you suggest.

 

Thanks,

tjmcgough
5 - Atom

Came across this post while searching for a way to build a simple scheduler. We didn't purchase the scheduler and are currently using Windows task manager in a very simple way - one task scheduled per workflow. We need to expand on this and it sounds like what you built may be what we need to do. Would you be open to sharing your design?

altx_user28
5 - Atom

Hi tjmchough, could you pls share more information on how you are using Task Scheduler to run Alteryx workflows, I have been trying but not sure what setting i am doing wrong.

Action: Start a program - Program/Script - "C:\Program Files\Alteryx\bin\AlteryxGui.exe"

Start in: C:\Users\username\Desktop\TEST_WORKFLOW

 

Can you point out what is incorrect here?

 

hroderick-thr
11 - Bolide

Welcome to Alteryx. I use task scheduler a lot and it sounds like there may be a popup box that's waiting on a response. This could be asking for credentials or the dreaded 'alteryx has stopped working'.  

 

I recommend capturing the results from your workflows for deeper analysis into a txt file.

Something like this in your bat file

 

del "D:\mydir\mylog.txt"

call AlteryxEngineCmd.exe "D:\mydir\myworkflow01.yxmd"  >> "D:\mydir\mylog.txt" 2>&1

call AlteryxEngineCmd.exe "D:\mydir\myworkflow02.yxmd"  >> "D:\mydir\mylog.txt" 2>&1

call AlteryxEngineCmd.exe "D:\mydir\myworkflow03.yxmd"  >> "D:\mydir\mylog.txt" 2>&1

...

call AlteryxEngineCmd.exe "D:\mydir\myworkflow23.yxmd"  >> "D:\mydir\mylog.txt" 2>&1

 

This should at least show where it is hanging and if it hangs in the same place every time.

 

Other things to check is job configuration to "only run when user is logged on" to eliminate that possible difference

 

Other things to note is pattern of time-of-day or day-of-week of failure. It may indicate a conflict with database backups or something.

 

Other possibility is people having input files open when you need them.

 

Good luck.