How to delay a workflow from running until 5 seconds after page load?

The way to do this with delaying anything on the front-end is as follows:

  1. Add the actions you want delayed to a custom event
  2. Then, set a workflow to run on page load and have it run an action to “schedule a custom event” and set it to run with a delay of 5 or 10 seconds.