Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Disable Workflow on certain days before execution?

cwaletzko
7 - Meteor

Hi,

I'm trying to create a workflow that only runs on the first business day of the month (excluding holidays).  I don't see that as an option on the scheduler.  Is this something that could be built into the workflow?  Right now I'm thinking that the run dates would have to be manually created.  Then, based on those dates I would run the workflow.  I wouldn't want to run any of the input data queries because they take some time to execute.  Can you configure something at the very start of the workflow, and determine if the entire workflow should be executed or disabled?

 

Thanks!!

5 REPLIES 5
kelly_gilbert
13 - Pulsar

@cwaletzko  - I'll be interested to see if others have better ideas, but I can think of two ways to handle it.

  1. Create 12 one-time schedules (one for each month)
    • Downside: you have to create 12 schedules (and remember to update them each year)!

  2. Use a batch macro
    • Wrap your "real" workflow inside a batch macro (just add a Control Parameter to your workflow, then save as a macro, .yxmc file).
      A batch macro will run based on the number of records sent to its control parameter. So, you either want to send the macro one record (macro runs) or zero records (macro does not run).
    • Create an outer workflow that checks today's date to see if matches a formula (or is in a list).
    • If the condition is met, send 1 record to the macro's control parameter (upside down question mark), so the macro will run.
      If the condition is NOT met, send zero records to the control parameter, so the macro will NOT run.
    • Schedule the outer workflow to run daily
    • Downside: this will consume a small amount of your server capacity every day, since the outer workflow has to run to check the current date.

 

Example outer workflow for method #2:

kelly_gilbert_1-1622212851189.png


If you can't use a formula to determine your run dates (may be tricky given the holidays), you could list all of your run dates in the text input, and then change the filter to input_date = todate(datetimetoday()).

Jonathan-Sherman
15 - Aurora
15 - Aurora

Love this workaround @kelly_gilbert!

Jonathan-Sherman
15 - Aurora
15 - Aurora

It's a great point you make @cwaletzko, perhaps post about this on the Alteryx Server Ideas board! It's something i've seen asked for a few times now.

Board is availiable here: https://community.alteryx.com/t5/Alteryx-Server-Ideas/idb-p/server-ideas

kelly_gilbert
13 - Pulsar

@Jonathan-Sherman - thank you - I had intended to include the link to this Idea, which sounds exactly like what you're asking for, @cwaletzko! (and, while you're over there, check out the other great ideas for scheduling flexibility... I definitely found a few to upvote!)

Jonathan-Sherman
15 - Aurora
15 - Aurora

@kelly_gilbert even better! I've also given it a like, definitely something that would be so helpful! 😊

Labels