ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Delay Time between containers

cvinju
6 - Meteoroid

i'm creating a workflow that (1st control container) checks to see if a dir exists, if it doesn't it will create it, then (2nd control container) move .csv files from path A to this newly created/existing path. they work when run separately but don't when combined. want to see if adding a delay between the 2 containers would help.

 

cvinju_0-1767215395542.png

 

6 REPLIES 6
jrlindem
12 - Quasar

Couple things:

This should work.  But given your illustration, do you have the control containers connected so they run in sequence?  Otherwise, they are going to attempt to run at the same time...  See red line:

jrlindem_0-1767216923678.png

 



But a better option might be to create the CSV into a temp location, then simply use the Run Command to Create the directory if it doesn't exist and then move the file.  You can even have the Run Command tool run multiple statements in order if needed.

 

Hope that helps, -Jay

cvinju
6 - Meteoroid

 i did have them connected and it still wasn't working. i disconnected them to test running them separately to ensure they ran successfully.

alexnajm
19 - Altair
19 - Altair

There is a Wait a Second macro available from the CReW macros - just do a quick google search and download/install them!

dreldrel
9 - Comet

If your environment does not allow you to install third-party tools, you can use a Python tool with time.sleep() function. Below is the sample code:

 

import time
from ayx import Alteryx

 

# Wait for 5 seconds
time.sleep(5)

cvinju
6 - Meteoroid

i have never used the python tool previously so sorry if these are simple/stupid questions. where do i put the code? do i link the control container to the python tool or the run command tool? which output number do i link to the 2nd control container.

cvinju_1-1767288219861.png

 

 

NeoInfiniTech
11 - Bolide

Hi @cvinju,

 

I posted a reply to an idea regarding Adjustable Delay for Control Containers which is relevant to the issue you are experiencing. You can copy the code block contents I posted in that reply and save it as a YXMD file, then open it in Alteryx Designer and copy the delay part.

 

The only thing you will need to change to make it work correctly is the Text Input tool content, containing the URL to a local file on your computer. It can also be configured to read and download the workflow itself. If necessary, you can also configure the Throttle tool to adjust the delay. Just keep in mind that it is best to copy all the related tools to your workflow from the workflow I shared at once.

 

If you would like to place the tools on the canvas by yourself, place all the tools between the control containers that is going to connect them in sequence (including the Text Input tool to be connected to the Append tool) except for the Throttle tool. Only after placing all the tools should you insert into connection the Throttle tool before the Download tool. Otherwise, the Download tool will not be able to find the URL field.

Labels
Top Solution Authors