Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

looping scripts

Featured Replies

  • Newbies

hi there,

we have 2 databases, where one is the "frontend" (users can input data via the web). the other "backend" should handle the datasets by applying timeconsuming scripts.

we'd like "backend" to loop through the following:

1. catching new datasets from "frontend" (identified by a marker, named i. e. "new")

2. setting the marker in "frontend" to i. e. "handled"

3. applying a "timeconsuming" script on each catched dataset in "backend"

4. deleting these datasets

5. if "backend" contains zero datasets: start over again from 1

since these scripts are really timeconsuming, the "frontend" would be blocked while executing.

so we decided to give this a try. but: we have no idea how to do this ...

please help.

thank you very much in advance.

michael.

When you call a backend script from the front end, the script must be completed on the backend before the front end is released (i.e. unfrozen).

There are some tricks to getting around this problem, but you will need another workstation to perform the task (requires a plug in as well), or you need to schedule the backend tasks for off peak usage hours (scheduled tasks will not update the data until the task is run).

The best suggestion is to re-examine your backend tasks to find ways to speed these tasks up.

Guy,

If I understand correctly, your backend script could be something like this (pseudo-code):


Loop

  Find record with "new" in marker field

  if ( found record )

    SetField[ marker, "handled" ]

    Exit Record

    PerformScript["TimeConsuming"]

    Delete Record / Request

  EndIf

  Pause[1]  ( optional, might avoid the backend machine using up too much server time )

EndLoop

If you write it like the above, you should be able to expand your operation to have multiple backends running, since they will do a new find for "new" records before each script run, and only process a single dataset at a time, leaving the others available for other backends.

Hope this helps.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.