Hi all! Starting to dig in to the scripting block a bit more… is there a way to force the script to run automatically?
Wrote a script to watch a table and make sure everything is linked to the same record on a junction table… but this is rendered useless if I have to train people to hit the button every time they login. :slightly_smiling_face:
Okay, so you have created a useless script. This is one of the pitfalls lacking good requirements planning.
As you now know, there is no way to encourage scripts to run on a specified interval. Nor is there an event-model in Airtable that might recognize when a script should fire. I believe both of these are likely features in Airtable’s future, but until then your options are limited.
Write the script block in a way that causes it to always run looking for the linking conditions to process. This involves a while(true) loop that never evaluates to false. There are two key issues with this - (a) Airtable might not like it; it’s using server resources day and night, and (b) it requires your browser to be live and uninterrupted to run the block 24/7.
Move the script to a proper API-driven approach that fires every ten minutes.
Yep - makes sense and even more so in this post.
If you are using Zapier to transform or ingest data AND the business requirement calls for lights-out processing (automatically invoked), a script block is not likely to compete for that business because there are presently no apparent ways to invoke a script block via the API or via a direct web service call into the script block.