Trigger a custom page script by date/time like a CRON job?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hey all,

I have some fields that I would like to "wipe" on Dec. 31 every year. I know that dynamic form rules do not work unless the record is opened, so I was wondering if anyone has a solution for triggering a custom page script within QB automatically at a certain date and time.

I know this can be done on the server side using CRON, just would like to implement it within Quickbase if possible.
Photo of B

B

  • 20 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,044 Points 20k badge 2x thumb
You need some type of periodic trigger event to kick off the script and there is no such feature in QuickBase itself. The next place to look is at some type of external service that creates the periodic trigger event. To be honest using an external service for this single purpose just creates more complexity, new failure points and additional cost for the external service. If CRON triggering is all you are using the external service for it may not be worth the effort.

Another approach you can take is what I call the "Dashboard CRON". Using the approach you embed a small script in a user defined page and place it on the dashboard in a manner so that it does not display any visible content - just the script.. The script will run whenever the a user navigates to the dashboard which might happen 100s of times a day. In the script you have logic to check how long it has been since the script last run and if it should run on the current visit to the dashboard. The memory to save the state of when the last time the script ran and how frequently it should run can be stored in a user defined variable, user defined page or one of the browser storage options (local storage, session storage etc).