Skip to main content
Inspiring
Aug 23, 2023 2:52 PM UTC
Question

Timer Question -Pause /Wait

I have a CF process where I click a submit button.

 

Then I need the process to wait/pause for 30 seconds and then run another check.

 

If the check is no the process ends.

 

If the check is yes then i need the process to wait for 10 more seconds and then run the checks again.

 

What is a good way to do this to get the processes to wait the 30 seconds and then the 10 seconds?

    This topic is closed to new replies. Start a new post to keep the conversation going.

    4 replies

    Legend
    Aug 23, 2023 3:02 PM UTC

    Do you need the user to wait for this process or is it done "behind the scenes"? 

    If the user has to wait, you'll need some Javascript to build a user interface.

    If behind the scenes, your can use the sleep() function

    For instance, to wait for 30 secs: #sleep(30000)#

    Translate
    Participating Frequently
    Aug 23, 2023 3:22 PM UTC

    Just an add-on thought, even if the sleep happens "behind the scenes," you'll want to visually show the user a notification or spinner-type object that lets them know that something actually IS happening -- otherwise there will probably be multiple followup clicks by the user when they don't see anything happening onscreen.

    Translate
    Legend
    Aug 23, 2023 3:27 PM UTC

    Yes, my thinking, too, but I didn't articulate it as well as this

    Translate