Alteryx Server Discussions

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

How to pass input parameter to the workflow in Scheduler command line

anburaja
6 - Meteoroid

I am using the below command to schedule a workflow. How do i pass inputs to the workflow abc.yxmc. This workflow accepts one input parameter through macro inputs.

 

AlteryxService.exe addtoqueue=abc.yxmc,server1,1234567890

5 REPLIES 5
SteveA
Alteryx
Alteryx

Hi @anburaja,

 

Unfortunately, the addtoqueue command-line option does not currently accept external configuration for the target module/package.  If the module needs configuration, you'll have to provide a default value for the configurable options when you submit the job for execution.  One suggestion is to wrap the module in another Alteryx module that provides the configuration, another is to use a chained app.

 

Best,

Steve A.

 

anburaja
6 - Meteoroid

Hi @

How do I command-line schedule the same Alteryx Module multiple times with different inputs? The same alteryx module should run parallelly with different inputs through a command line scheduler.

 

Thanks,

Anbu

SteveA
Alteryx
Alteryx

Hi @anburaja,

 

In addition to the Scheduler, do you have the Gallery running as well?  If so you can use the Gallery's public API to queue an app for immediate execution along with answers to the app's questions.  This execution path has the same outcome as using addtoqueue on the command line, but with the added benefit of configuring the app more completely prior to execution.  The Gallery API can be driven from an Alteryx module via the Download Tool.

 

If you don't have Gallery, then we'll have to devise a workaround (there are several possible options).  I'm pulling @MattH into the conversation to see if he has any suggestions before getting too deep.

 

Best,
Steve A.

anburaja
6 - Meteoroid
We dont use gallery. I will wait for the workaround.
SteveA
Alteryx
Alteryx

Hi @anburaja,

 

Here's a couple of suggestions, thanks to @KoryC and @GaryS for lending a hand:

  • If you only have a few configurations to run, then convert your existing module to a macro and, for each configuration, create a new wrapper module that calls the macro with the correct configuration.  Schedule these new modules via addtoqueue.
  • If you have a number of configurations to run, capture the configurations in a new module (say, a text input tool) or in an external text file.  As in (1), convert your existing module to a macro and create a new wrapper module that iterates through each configuration and calls the macro with each config.  Schedule the wrapper module via addtoqueue.