Skip to main content
Nintex Community Menu Bar
Question

Create a scheduler in skuid

  • July 12, 2024
  • 4 replies
  • 20 views

Forum|alt.badge.img+3

I have a requirement to save models automatically every 5mins. I tried to create settimeout function. But in the latest version, the JS Inline snippet doesn’t trigger on page load. Is there any other options?

4 replies

Forum|alt.badge.img+17

I use this online snippet on a V1 page to requery a model every 5 seconds. Has worked perfectly for a couple years. You have to call it from an action. I use on on page render action sequence to launch it.

// To be used as an inline snippet
var model = skuid.$M(‘INSERT_YOUR_MODEL_NAME_HERE’),
refreshInSeconds = 5;

if (model) setInterval(function () {
model.updateData();
}, refreshInSeconds * 1000);


Forum|alt.badge.img+3

Your snippet is triggered only when a page loaded correct? My requirement is to trigger the snippet every 5 mins.


Forum|alt.badge.img+17

Page render action triggers the snippet to run. The snippet has a loop built in that continuously runs at the designated interval so it would accomplish what you are looking for.


Forum|alt.badge.img+17
  • Nintex Employee
  • July 12, 2024

We published an example snippet for periodic reloading of a page’s model in our Skuid Labs repository. Check it out here:

favicon.svggithub.com

skuid-labs/experiments/snippets/realTimeOppDashboard at master ·...

master/experiments/snippets/realTimeOppDashboard

A place for the Skuid community to share custom components, formulas, and other extensions - skuid-labs/experiments/snippets/realTimeOppDashboard at master · skuid/skuid-labs