Alteryx Server Discussions

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

Using command line to run a workflow on a different machine

jgolden
7 - Meteor

Hi folks,

 

We're just getting our feet wet over here, and recently brought alteryx into the fold.  We have been regular Tableau users for years, and currently we excute some extract jobs on one machine from batch scripts, which then login and run tabcmd on the tableau server.

 

We are looking to do something similar with Alteryx workflows.  I have been looking for a good example.

 

For instance, say we have a workflow called "travel.yxmd", and we want to run this workflow from a command line on a machine other than the alteryx server.

 

Does anyone have any examples of how this looks on windows 2008 R2 servers?

 

Logging in, and then executing the command?

 

When I say we are new to this, I mean liek weeks old.

 

Is this the satandard command from the directory on the alteryx server:  AlteryxEngineCmd.exe MyWorkflow.yxmd

 

I truly appreciate the help.

 

Thanks,

Jamie

18 REPLIES 18
jgolden
7 - Meteor

So, how we have it set is there is a folder where the workflows are kept on a D: drive.

We have a batch script folder on C: drive, where the bat files live, that can be scheduled via either windows scheduler, or a third party tool you may be using.

The bat file looks like this:

D:
cd "Program Files\Alteryx\bin"
AlteryxService addtoqueue="D:\alteryx_queue\Key jobs.yxmd",localhost,58XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


As you can see, it calls the "AlteryxService" task "addtoqueue" which, when run, adds the yxmd to the the scheduler queue on the alteryx machine.

These files live on the primary alteryx scheduler/server.


fiorano
8 - Asteroid

Hi @SteveA

 

We need to simply run the workflow.  We don't have a server licence - we are just running the basic Desktop version.....

 

I was hoping that there is a simple way of using a windows batch file and TaskSheduler to run this bat file on a nightly basis rather than remembering to open Alteryx every day and run it manually...

fiorano
8 - Asteroid

Hi @jgolden,

 

Thanks for your reply... as mentioned we don't have Alteryx Server .. so was wondering if there is a way of 'opening' Alterryx via a batch file and running a workflow...

SteveA
Alteryx
Alteryx

@fiorano

 

Yes, there is.  You can use the Alteryx Engine on the command line from your bat script, which in turn can be run from the system scheduler on Windows, or you can drive the Alteryx Engine command line directly from the system scheduler.

 

If you open a command shell (cmd.exe) and navigate to the Alteryx installation directory (by default "c:\Program Files\Alteryx\bin"), type "AlteryxEngineCmd.exe" to see the options available.  Note that there are other options available on the command line depending on the type of app you are executing, so I encourage you to play with it a bit and turn to Community when you need a hand.

 

Happy automating!

Steve A

 

fiorano
8 - Asteroid

Hi @SteveA

 

Just tried what you suggested and received the following error:

 

Error Alteryx Engine : The feature "API" is not licensed

 

Any thoughts

jgolden
7 - Meteor
Do you have a token to Pass?


Jamie Golden l Business Intelligence Administrator & Analyst l Grand Circle LLC, Boston MA
Direct (617) 346-6205 l jgolden@oattravel.com
fiorano
8 - Asteroid

HI, @jgolden

 

No, I dont think I do... as I mentioned - we are only running the standard desktop edition of alteryx...

 

Fiorano

DanM
Alteryx Community Team
Alteryx Community Team

@fiorano,

 

You must either have Alteryx Desktop with Automation or the Alteryx Server to access the API.

 

Regards,

DanM

Szabolcs
5 - Atom

Hi,

 

This is working but I got an error.

Error - ToolId 1: Error SQLDriverConnect: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified despite when I run directly on the other computer this is run successfully either if I run in alteryx or use AlteryxEngineCmd.exe.

The workflow only retrieve data from Aws and send to sql server.

Have you experienced similar issue?

 

Thanks,

Szabolcs