Skip to main content
Inspiring
August 23, 2023
Question

Timer Question -Pause /Wait

  • August 23, 2023
  • 1 reply
  • 429 views

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 has been closed for replies.

    1 reply

    Legend
    August 23, 2023

    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)#

    Participating Frequently
    August 23, 2023

    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.

    Legend
    August 23, 2023

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